diff options
author | Nadrieril | 2019-02-27 15:45:09 +0100 |
---|---|---|
committer | Nadrieril | 2019-02-27 18:53:08 +0100 |
commit | d8b88c1a5da7218011fca2bccc525907aa439335 (patch) | |
tree | 7a93645a8209d640bb8dd32e36468d544f732f11 /src/parser.rs | |
parent | 8a1012be323459440032813c2b21b62174924c6c (diff) |
Switch to Rust 2018 edition
Diffstat (limited to 'src/parser.rs')
-rw-r--r-- | src/parser.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/parser.rs b/src/parser.rs index 3ad7ffc..2e252b1 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -1,8 +1,8 @@ use lalrpop_util; -use grammar; -use grammar_util::BoxExpr; -use lexer::{Lexer, LexicalError, Tok}; +use crate::grammar; +use crate::grammar_util::BoxExpr; +use crate::lexer::{Lexer, LexicalError, Tok}; pub type ParseError<'i> = lalrpop_util::ParseError<usize, Tok<'i>, LexicalError>; @@ -12,7 +12,7 @@ pub fn parse_expr(s: &str) -> Result<BoxExpr, ParseError> { #[test] fn test_parse() { - use core::Expr::*; + use crate::core::Expr::*; println!("test {:?}", parse_expr("+3 + +5 * +10")); assert!(parse_expr("22").is_ok()); assert!(parse_expr("(22)").is_ok()); |