update runtime tok look for main in defult namespace

This commit is contained in:
nub31
2025-07-07 17:06:28 +02:00
parent 7f9a60fcb5
commit 2a8578726d
11 changed files with 65 additions and 116 deletions

View File

@@ -22,12 +22,7 @@ public sealed class Tokenizer
["trait"] = Symbol.Trait,
["impl"] = Symbol.Impl,
["for"] = Symbol.For,
};
private static readonly Dictionary<string, Modifier> Modifiers = new()
{
["export"] = Modifier.Export,
["extern"] = Modifier.Extern,
["extern"] = Symbol.Extern
};
private static readonly Dictionary<char[], Symbol> Chians = new()
@@ -129,11 +124,6 @@ public sealed class Tokenizer
return new SymbolToken(CreateSpan(startIndex), keywordSymbol);
}
if (Modifiers.TryGetValue(buffer, out var modifer))
{
return new ModifierToken(CreateSpan(startIndex), modifer);
}
if (buffer is "true" or "false")
{
return new LiteralToken(CreateSpan(startIndex), LiteralKind.Bool, buffer);