Implement copy_to_offset and copy_from_offset TAC instructions
This commit is contained in:
@@ -9,6 +9,7 @@ program;
|
||||
|
||||
(* - Aggregates can be allocated on the stack. *)
|
||||
(* - Procedure return type is parsed. *)
|
||||
(* - "|" can be used as binary "+" for pointer arithmetic. *)
|
||||
|
||||
type
|
||||
(**
|
||||
@@ -2167,6 +2168,9 @@ begin
|
||||
elsif token_kind = ElnaLexerKind.minus then
|
||||
_elna_lexer_skip_token();
|
||||
rhs_node := elna_parser_unary_expression()
|
||||
elsif token_kind = ElnaLexerKind.pipe then
|
||||
_elna_lexer_skip_token();
|
||||
rhs_node := elna_parser_unary_expression()
|
||||
elsif token_kind = ElnaLexerKind.multiplication then
|
||||
_elna_lexer_skip_token();
|
||||
rhs_node := elna_parser_unary_expression()
|
||||
@@ -2241,6 +2245,8 @@ begin
|
||||
instruction := elna_tac_instruction_create(ElnaTacOperator.add)
|
||||
elsif parser_node^.operator = ElnaLexerKind.minus then
|
||||
instruction := elna_tac_instruction_create(ElnaTacOperator.subtract)
|
||||
elsif parser_node^.operator = ElnaLexerKind.pipe then
|
||||
instruction := elna_tac_instruction_create(ElnaTacOperator.add)
|
||||
elsif parser_node^.operator = ElnaLexerKind.multiplication then
|
||||
instruction := elna_tac_instruction_create(ElnaTacOperator.multiply)
|
||||
elsif parser_node^.operator = ElnaLexerKind.and then
|
||||
@@ -5165,6 +5171,8 @@ begin
|
||||
result := ElnaLexerKind.left_square
|
||||
elsif character = ']' then
|
||||
result := ElnaLexerKind.right_square
|
||||
elsif character = '|' then
|
||||
result := ElnaLexerKind.pipe
|
||||
end;
|
||||
return result
|
||||
end;
|
||||
|
||||
Reference in New Issue
Block a user