aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-07-19 03:00:59 +0200
committerEugen Wissner <belka@caraus.de>2026-07-19 03:00:59 +0200
commitcd2ee0c97348444779a155909b7ec78d89cfd2e0 (patch)
tree06cdf2d033c30741a911b609c40e9ebbc504ac4e /source
parent2e1e95dc716167853be4a4b6acaaee1688142744 (diff)
downloadelna-cd2ee0c97348444779a155909b7ec78d89cfd2e0.tar.gz
Remove old record syntax
Diffstat (limited to 'source')
-rw-r--r--source/lexer.elna6
-rw-r--r--source/main.elna12
2 files changed, 14 insertions, 4 deletions
diff --git a/source/lexer.elna b/source/lexer.elna
index c221f07..9e1db21 100644
--- a/source/lexer.elna
+++ b/source/lexer.elna
@@ -100,6 +100,8 @@ type
right_paren,
left_square,
right_square,
+ left_brace,
+ right_brace,
greater_equal,
less_equal,
greater_than,
@@ -756,8 +758,8 @@ begin
cursor^.start := code_pointer;
cursor^.finish := code_pointer;
cursor^.token := nil;
- cursor^.position.start_location := ElnaLocation(1u, 1u);
- cursor^.position.end_location := ElnaLocation(1u, 1u)
+ cursor^.position.start_location := ElnaLocation{ line: 1u, column: 1u };
+ cursor^.position.end_location := ElnaLocation{ line: 1u, column: 1u }
return
(**
diff --git a/source/main.elna b/source/main.elna
index fdfc49f..8f0250b 100644
--- a/source/main.elna
+++ b/source/main.elna
@@ -445,6 +445,14 @@ begin
current_token := malloc(#size(ElnaLexerToken));
current_token^.kind := ElnaLexerKind.right_paren;
source_code_advance(@source_code)
+ elsif first_char = '{' then
+ current_token := malloc(#size(ElnaLexerToken));
+ current_token^.kind := ElnaLexerKind.left_brace;
+ source_code_advance(@source_code)
+ elsif first_char = '}' then
+ current_token := malloc(#size(ElnaLexerToken));
+ current_token^.kind := ElnaLexerKind.right_brace;
+ source_code_advance(@source_code)
elsif first_char = '\'' then
source_code_advance(@source_code);
@@ -585,7 +593,7 @@ var
token_buffer: StringBuffer
lexer: Tokenizer
begin
- lexer := Tokenizer(0u, nil);
+ lexer := Tokenizer{ length: 0u, data: nil };
token_buffer := string_buffer_new();
lexer_spaces(@source_code);
@@ -801,7 +809,7 @@ begin
fclose(source_file^.handle)
end;
- source_code.position := ElnaLocation(1u, 1u);
+ source_code.position := ElnaLocation{line: 1u, column: 1u};
source_code.input := source_file;
source_code.empty := source_file_empty;
source_code.head := source_file_head;