Skip to content

Commit

Permalink
Minor fix in lexer, regarding EQ(==) symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
VedantParanjape committed Jul 12, 2020
1 parent 5f6726b commit f55cfed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/test.sim
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if : 4!=2 {
/* if else nested */
if : 3>2 {
int a:= 3 +8;
if : 4=4 {
if : 4 == 4 {
bool te := false;
}
else {
Expand Down Expand Up @@ -73,7 +73,7 @@ for : iota in 1:3 {
}

/* while loop */
while : 3 = 3 {
while : 3 == 3 {
int rt := 90;
}

Expand Down
2 changes: 1 addition & 1 deletion src/lexer.l
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ comma ([,])
{
return OPR_LE;
}
else if (!strcmp(yytext,"="))
else if (!strcmp(yytext,"=="))
{
return OPR_EQ;
}
Expand Down

0 comments on commit f55cfed

Please sign in to comment.