namespace

This commit is contained in:
nub31
2025-05-26 19:38:02 +02:00
parent cfd7a6ebef
commit 37b4ce3989
7 changed files with 107 additions and 62 deletions

View File

@@ -6,9 +6,8 @@ public class Lexer
{
private static readonly Dictionary<string, Symbol> Keywords = new()
{
["namespace"] = Symbol.Namespace,
["func"] = Symbol.Func,
["import"] = Symbol.Import,
["module"] = Symbol.Module,
["if"] = Symbol.If,
["else"] = Symbol.Else,
["while"] = Symbol.While,
@@ -31,6 +30,7 @@ public class Lexer
[['!', '=']] = Symbol.NotEqual,
[['<', '=']] = Symbol.LessThanOrEqual,
[['>', '=']] = Symbol.GreaterThanOrEqual,
[[':', ':']] = Symbol.DoubleColon,
};
private static readonly Dictionary<char, Symbol> Chars = new()