summaryrefslogtreecommitdiff
path: root/oryxc/src/lexer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'oryxc/src/lexer.rs')
-rw-r--r--oryxc/src/lexer.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/oryxc/src/lexer.rs b/oryxc/src/lexer.rs
index 09e2881..2dace02 100644
--- a/oryxc/src/lexer.rs
+++ b/oryxc/src/lexer.rs
@@ -56,9 +56,11 @@ pub enum TokenType {
Identifier,
KeywordDef,
KeywordFunc,
+ KeywordModule,
KeywordReturn,
Number,
Percent2,
+ SlashPercent,
String,
}
@@ -219,6 +221,13 @@ pub fn tokenize(s: &str) -> Result<Soa<Token>, OryxError> {
view: (i, j + 1),
})
},
+ '/' if ctx.peek().is_some_and(|c| c == '%') => {
+ ctx.next(); /* Consume ‘/’ */
+ Some(Token {
+ kind: TokenType::SlashPercent,
+ view: (i, j + 1),
+ })
+ },
'!' | '&' | '(' | ')' | '*' | '+' | ',' | '-' | '/' | ';' | '<'
| '=' | '>' | '[' | ']' | '^' | '{' | '|' | '}' | '~' | '…'
| '%' => Some(Token {