Skip to content

Commit

Permalink
Merge pull request #76 from LunaStev/develop
Browse files Browse the repository at this point in the history
Add Module and Class Token Support
LunaStev authored Jan 24, 2025

Verified

This commit was signed with the committer’s verified signature. The key has expired.
zakkak Foivos Zakkak
2 parents d18a88d + 03842b8 commit 05e39b5
Showing 2 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/lexer/lexer.rs
Original file line number Diff line number Diff line change
@@ -458,6 +458,20 @@ impl<'a> Lexer<'a> {
line: self.line,
}
},
"module" => {
Token {
token_type: TokenType::Module,
lexeme: "module".to_string(),
line: self.line,
}
},
"class" => {
Token {
token_type: TokenType::Class,
lexeme: "class".to_string(),
line: self.line,
}
},
"in" => {
Token {
token_type: TokenType::IN,
2 changes: 2 additions & 0 deletions src/lexer/token.rs
Original file line number Diff line number Diff line change
@@ -115,6 +115,8 @@ pub enum TokenType {
INPUT,
PRINT,
PRINTLN,
Module,
Class,
Match,
LogicalAnd, // &&
BitwiseAnd, // &

0 comments on commit 05e39b5

Please sign in to comment.