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/syntax/token.rs | |
| parent | 0bfee5b7772338fd39bbf708d3e31ea7bcec859b (diff) | |
Parse import and include expressions
Co-Authored-By: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to 'src/syntax/token.rs')
| -rw-r--r-- | src/syntax/token.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/syntax/token.rs b/src/syntax/token.rs index 40e1d6d2..3484536d 100644 --- a/src/syntax/token.rs +++ b/src/syntax/token.rs @@ -32,8 +32,6 @@ pub enum Token<'s> { Semicolon, /// A colon: `:`. Colon, - /// A pipe: `|`. - Pipe, /// A plus: `+`. Plus, /// A hyphen: `-`. @@ -90,6 +88,12 @@ pub enum Token<'s> { Continue, /// The `return` keyword. Return, + /// The `import` keyword. + Import, + /// The `include` keyword. + Include, + /// The `using` keyword. + Using, /// One or more whitespace characters. /// /// The contained `usize` denotes the number of newlines that were contained @@ -201,7 +205,6 @@ impl<'s> Token<'s> { Self::Comma => "comma", Self::Semicolon => "semicolon", Self::Colon => "colon", - Self::Pipe => "pipe", Self::Plus => "plus", Self::Hyph => "minus", Self::Slash => "slash", @@ -231,6 +234,9 @@ impl<'s> Token<'s> { Self::Break => "keyword `break`", Self::Continue => "keyword `continue`", Self::Return => "keyword `return`", + Self::Import => "keyword `import`", + Self::Include => "keyword `include`", + Self::Using => "keyword `using`", Self::Space(_) => "space", Self::Text(_) => "text", Self::Raw(_) => "raw block", |
