diff options
author | Carlos Maniero <carlos@maniero.me> | 2023-05-10 01:43:40 -0300 |
---|---|---|
committer | Carlos Maniero <carlos@maniero.me> | 2023-05-10 12:18:17 -0300 |
commit | 88630ebbea03e85119cf9795320a83cb846bdd20 (patch) | |
tree | ecf1f46ce6d9048c5d51ff70413e992936ebf28f /src/gas_assembly_generator.h | |
parent | 3065f54e3a122dd3d8c2deffdec72ec48ea4f165 (diff) |
gas: Implement && and || for if statements
Now if statements are complete! The function
%gas_assembly_generator_compile_condition% is generic and will be used
for any other flow-control statment. The only requirement to it work is
having two labels: One to jump when the condition is true, and another
one when the condition is false.
Signed-off-by: Carlos Maniero <carlos@maniero.me>
Diffstat (limited to 'src/gas_assembly_generator.h')
-rw-r--r-- | src/gas_assembly_generator.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gas_assembly_generator.h b/src/gas_assembly_generator.h index 3d9a43c..2e195fb 100644 --- a/src/gas_assembly_generator.h +++ b/src/gas_assembly_generator.h @@ -46,7 +46,7 @@ typedef struct gas_assembly_generator_t FILE *stream; vector_t *refs; int stack_offset; - uint64_t label_counter; + uint64_t cur_label_index; evaluation_result_t latest_evaluation; } gas_assembly_generator_t; |