Do not remove tokens before AST json serialization
This commit is contained in:
parent
4f7612ac14
commit
6b63e9b990
10 changed files with 30 additions and 145 deletions
|
@ -153,8 +153,9 @@ impl fmt::Debug for LazyTokenStream {
|
|||
}
|
||||
|
||||
impl<S: Encoder> Encodable<S> for LazyTokenStream {
|
||||
fn encode(&self, _s: &mut S) -> Result<(), S::Error> {
|
||||
panic!("Attempted to encode LazyTokenStream");
|
||||
fn encode(&self, s: &mut S) -> Result<(), S::Error> {
|
||||
// Used by AST json printing.
|
||||
Encodable::encode(&self.create_token_stream(), s)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue