Skip to content

Commit

Permalink
fix parser bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hoosierEE committed Jul 29, 2024
1 parent 08c28dc commit 4a053ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prototype/Parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def loop(i=0) -> int|None:#return index of error-causing token (if any), else No
else: break
elif c in ADVERB: x = s.pop(); s.append(Op(Ast(c,Ast(x.name)),x.arity)); x.arity==2 and pad(n)
elif noun(c) or c[0] in '`"': d.append(Ast(c)); break
elif c in VERB+VERBM and n in CPAREN+ENDEXP:
elif c in ASSIGN+VERB+VERBM and n in CPAREN+ENDEXP:
d.append(Ast(c)) if s and s[-1].name in OPAREN else rq(Ast('prj',Ast(c))); break
elif c in VERB+VERBM and n in ADVERB: d.append(Ast(c)); break
else: s.append(Op(c,1))
Expand Down

0 comments on commit 4a053ae

Please sign in to comment.