diff options
| author | Martin Haug <mhaug@live.de> | 2021-05-29 12:25:10 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-05-31 22:33:40 +0200 |
| commit | 9f77f09aacd1fb0fd6138a6d16ed2755f6bfae3f (patch) | |
| tree | eba4a1609f178b3f2e6838ca9ee3c013e420621f /src/parse/tokens.rs | |
| parent | 0bfee5b7772338fd39bbf708d3e31ea7bcec859b (diff) | |
Parse import and include expressions
Co-Authored-By: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to 'src/parse/tokens.rs')
| -rw-r--r-- | src/parse/tokens.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parse/tokens.rs b/src/parse/tokens.rs index a57db93b..62d2e68e 100644 --- a/src/parse/tokens.rs +++ b/src/parse/tokens.rs @@ -124,7 +124,6 @@ impl<'s> Iterator for Tokens<'s> { ',' => Token::Comma, ';' => Token::Semicolon, ':' => Token::Colon, - '|' => Token::Pipe, '+' => Token::Plus, '-' => Token::Hyph, '*' => Token::Star, @@ -456,6 +455,9 @@ fn keyword(id: &str) -> Option<Token<'static>> { "break" => Token::Break, "continue" => Token::Continue, "return" => Token::Return, + "import" => Token::Import, + "include" => Token::Include, + "using" => Token::Using, _ => return None, }) } @@ -617,7 +619,6 @@ mod tests { t!(Code: "," => Comma); t!(Code: ";" => Semicolon); t!(Code: ":" => Colon); - t!(Code: "|" => Pipe); t!(Code: "+" => Plus); t!(Code: "-" => Hyph); t!(Code[" a1"]: "*" => Star); @@ -637,7 +638,6 @@ mod tests { t!(Code: "=>" => Arrow); // Test combinations. - t!(Code: "|=>" => Pipe, Arrow); t!(Code: "<=>" => LtEq, Gt); t!(Code[" a/"]: "..." => Dots, Invalid(".")); |
