parser/mod.rs: Take proc_macro::TokenStream from the compiler; handle...

parser/mod.rs: Take proc_macro::TokenStream from the compiler; handle proc_macro2::TokenStream internally
parent 9234437b
use proc_macro::{Diagnostic, Level, TokenStream};
use proc_macro::{self, Diagnostic, Level};
use proc_macro2::{Ident};
use proc_macro2::{Ident, TokenStream};
use syn::buffer::Cursor;
use syn::punctuated::Punctuated;
use syn::synom::{PResult, Synom};
......@@ -10,7 +10,7 @@ use ast;
use errors::*;
use ident_ext::IdentExt;
pub fn parse_program(token_stream: TokenStream) -> Result<ast::Program> {
pub fn parse_program(token_stream: proc_macro::TokenStream) -> Result<ast::Program> {
syn::parse(token_stream).map_err(|e| e.into())
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment