aboutsummaryrefslogtreecommitdiffstats
path: root/src/frontend/lexer.c
diff options
context:
space:
mode:
authorGalin Simeonov <gts@volconst.com>2021-06-04 13:04:36 +0300
committerGalin Simeonov <gts@volconst.com>2021-07-15 18:04:02 +0300
commitb845e4754be86d2216733d9bea75cb301f38739d (patch)
tree5ba6355d1cb36b1bfaadf82781796b1c42b9202b /src/frontend/lexer.c
parent76fc38b3cdfded2911b464baa7b182b5102318d1 (diff)
downloadMEGATRON-b845e4754be86d2216733d9bea75cb301f38739d.tar.gz
added expressions and the if statement
Diffstat (limited to 'src/frontend/lexer.c')
-rw-r--r--src/frontend/lexer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/frontend/lexer.c b/src/frontend/lexer.c
index de8ff95..668d7cd 100644
--- a/src/frontend/lexer.c
+++ b/src/frontend/lexer.c
@@ -49,10 +49,10 @@ struct token* lex_step(struct Source *src,struct Translation_Data *translation_d
return get_token(src->src+src->where_in_src-sizeof("]")+1,sizeof("]")-1,KW_CLOSE_SQUARE,src->current_row,src->current_column);
if(check_and_move_if_on_word(";",sizeof(";")-1,src,0))
return get_token(src->src+src->where_in_src-sizeof(";")+1,sizeof(";")-1,KW_SEMI_COLUMN,src->current_row,src->current_column);
- if(check_and_move_if_on_word("|",sizeof("|")-1,src,0))
- return get_token(src->src+src->where_in_src-sizeof("|")+1,sizeof("|")-1,KW_PIPE,src->current_row,src->current_column);
if(check_and_move_if_on_word("||",sizeof("||")-1,src,0))
return get_token(src->src+src->where_in_src-sizeof("||")+1,sizeof("||")-1,KW_OR,src->current_row,src->current_column);
+ if(check_and_move_if_on_word("|",sizeof("|")-1,src,0))
+ return get_token(src->src+src->where_in_src-sizeof("|")+1,sizeof("|")-1,KW_PIPE,src->current_row,src->current_column);
if(check_and_move_if_on_word("&&",sizeof("&&")-1,src,0))
return get_token(src->src+src->where_in_src-sizeof("&&")+1,sizeof("&&")-1,KW_AND,src->current_row,src->current_column);
if(check_and_move_if_on_word("!",sizeof("!")-1,src,0))