diff options
author | Himbeer <himbeer@disroot.org> | 2024-08-30 18:53:44 +0200 |
---|---|---|
committer | Himbeer <himbeer@disroot.org> | 2024-08-30 18:53:44 +0200 |
commit | fa461715a9a4fbca6bd012c0f2b8e35631ec12e8 (patch) | |
tree | 8982bb98b0737a8424cf9012ba9a6031f9754dd0 /lex.go | |
parent | 22786e52f6ed94424491660e33effd7173fd9279 (diff) |
Add support for local constant and variable declarations
Diffstat (limited to 'lex.go')
-rw-r--r-- | lex.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -296,6 +296,10 @@ func addKeywordOrIdentifier(name string, line int) token { return token{kind: function, line: line} case "return": return token{kind: ret, line: line} + case "const": + return token{kind: constKeyword, line: line} + case "mut": + return token{kind: mut, line: line} default: return token{kind: identifier, value: name, line: line} } |