Add jump_if_not_zero and bnez instructions
This commit is contained in:
@@ -4317,12 +4317,21 @@ var
|
||||
parser_node: Word;
|
||||
declaration_size: Word;
|
||||
result: Word;
|
||||
token_kind: Word;
|
||||
begin
|
||||
declaration_size := _module_declaration_size();
|
||||
result := _allocate(declaration_size);
|
||||
|
||||
_node_set_kind(result, NodeKind.module_declaration);
|
||||
|
||||
_skip_empty_lines();
|
||||
_elna_lexer_read_token(@token_kind);
|
||||
if token_kind = ElnaLexerKind._program then
|
||||
_elna_lexer_skip_token();
|
||||
_elna_lexer_read_token(@token_kind);
|
||||
_elna_lexer_skip_token()
|
||||
end;
|
||||
|
||||
parser_node := _elna_parser_type_part();
|
||||
_module_declaration_set_types(result, parser_node);
|
||||
|
||||
@@ -5161,8 +5170,14 @@ begin
|
||||
result := ElnaLexerKind._record
|
||||
elsif _string_compare(position_start, token_length, "or", 2) then
|
||||
result := ElnaLexerKind._or
|
||||
elsif _string_compare(position_start, token_length, "xor", 2) then
|
||||
elsif _string_compare(position_start, token_length, "xor", 3) then
|
||||
result := ElnaLexerKind._xor
|
||||
elsif _string_compare(position_start, token_length, "program", 7) then
|
||||
result := ElnaLexerKind._program
|
||||
elsif _string_compare(position_start, token_length, "module", 6) then
|
||||
result := ElnaLexerKind._module
|
||||
elsif _string_compare(position_start, token_length, "nil", 3) then
|
||||
result := ElnaLexerKind.null
|
||||
end;
|
||||
return result
|
||||
end;
|
||||
|
||||
Reference in New Issue
Block a user