daeisbae / AParser

Yet another programming language for educational purpose and simplicity
https://daeisbae.github.io/AParser/
MIT License
1 stars 0 forks source link

Implemented AST and Parser #25

Closed daeisbae closed 6 months ago

daeisbae commented 6 months ago

Currently, It supports identifiers and basic + and - arithmetic operation parsing.

Changes

./AParser
>>> 1+2
ProgramStatement {
BinaryExpression (Left Value : IntegerExpression (Value : 1), Op Value : +, Right Value : IntegerExpression (Value : 2), )
}
>>> 1+3+52+92+1
ProgramStatement {
BinaryExpression (Left Value : BinaryExpression (Left Value : BinaryExpression (Left Value : BinaryExpression (Left Value : IntegerExpression (Value : 1), Op Value : +, Right Value : IntegerExpression (Value : 3), ), Op Value : +, Right Value : IntegerExpression (Value : 52), ), Op Value : +, Right Value : IntegerExpression (Value : 92), ), Op Value : +, Right Value : IntegerExpression (Value : 1), )
}
>>>