daeisbae / AParser

Yet another programming language for educational purpose and simplicity
MIT License
0 stars 0 forks source link

Allow VariableDeclarationStmt's value be Expression than simple value #40

Closed daeisbae closed 4 months ago

daeisbae commented 4 months ago

Changes

Result

Previous

./AParser 
>>> set a = 1 + 2
terminate called after throwing an instance of 'UnexpectedTokenParsedException'
  what():  Unexpected Operator: 'Operator( Value: '+' )' is not allowed
Aborted

Now

./AParser 
>>> set a = 1+1
2
>>> a
2
>>> set b = 1 * 2 + 3
5
>>> b + a
7