aboutsummaryrefslogtreecommitdiff
path: root/source/main.elna
diff options
context:
space:
mode:
Diffstat (limited to 'source/main.elna')
-rw-r--r--source/main.elna12
1 files changed, 10 insertions, 2 deletions
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;