Add an empty cstdlib.elna source file

This commit is contained in:
2025-08-10 23:43:09 +03:00
parent 87058adcb3
commit 5146ea61b9
11 changed files with 360 additions and 417 deletions

View File

@@ -3,11 +3,7 @@
obtain one at https://mozilla.org/MPL/2.0/. *)
module;
import cstdlib;
from MemUtils import MemZero;
from Common import Identifier, ShortString;
from Lexer import Lexer, LexerToken, lexer_current, lexer_lex;
import cstdlib, common, Lexer;
type
Parser = record
@@ -24,7 +20,7 @@ type
kind: AstLiteralKind;
value: union
integer: Int;
string: ShortString;
string: String;
boolean: Bool
end
end;
@@ -237,7 +233,7 @@ begin
end
end;
current_field := current_field + 1;
MemZero(current_field, #size(AstFieldDeclaration));
memset(current_field, 0, #size(AstFieldDeclaration));
return field_declarations
end;
@@ -331,7 +327,7 @@ begin
token := parser_lex(parser^.lexer)
end;
current_case := current_case + 1;
MemZero(current_case, #size(Identifier));
memset(current_case, 0, #size(Identifier));
return result
end;
@@ -608,7 +604,7 @@ begin
token := parser_lex(parser^.lexer)
end;
current_symbol := current_symbol + 1;
MemZero(current_symbol, #size(Identifier));
memset(current_symbol, 0, #size(Identifier));
token := parser_lex(parser^.lexer);