feat: self-hosting progress - Nim backend, parser fixes, 64 struct fields, 13/14 modules check

This commit is contained in:
2026-06-01 23:42:25 +03:00
parent 1e8e119d9e
commit 2b911410cb
31 changed files with 2507 additions and 266 deletions
+20 -19
View File
@@ -46,31 +46,31 @@ const maxTokens: int = 32768;
const maxDiags: int = 128;
struct LexerDiag {
line: uint32,
column: uint32,
message: String,
line: uint32;
column: uint32;
message: String;
}
struct Lexer {
source: String,
sourceLen: int,
pos: int,
line: uint32,
column: uint32,
startLine: uint32,
startColumn: uint32,
startPos: int,
tokenCount: int,
tokens: *LexToken,
diagCount: int,
diags: *LexerDiag,
source: String;
sourceLen: int;
pos: int;
line: uint32;
column: uint32;
startLine: uint32;
startColumn: uint32;
startPos: int;
tokenCount: int;
tokens: *LexToken;
diagCount: int;
diags: *LexerDiag;
}
struct LexToken {
kind: int,
text: String,
line: uint32,
column: uint32,
kind: int;
text: String;
line: uint32;
column: uint32;
}
// ---------------------------------------------------------------------------
@@ -294,6 +294,7 @@ func lexKeywordKind(text: String) -> int {
if String_Eq(text, "self") { return tkSelf; }
if String_Eq(text, "super") { return tkSuper; }
if String_Eq(text, "sizeof") { return tkSizeOf; }
if String_Eq(text, "discard") { return tkDiscard; }
if String_Eq(text, "async") { return tkAsync; }
if String_Eq(text, "await") { return tkAwait; }
if String_Eq(text, "spawn") { return tkSpawn; }