charly-lang / charly

🐈 The Charly Programming Language | Written by @KCreate
https://charly-lang.github.io/charly/
MIT License
199 stars 10 forks source link

Parsing bug with nested call expressions #34

Closed KCreate closed 8 years ago

KCreate commented 8 years ago

The following code:

(print)("test");

Will produce this AST:

#: Program - BT:  ms
└╴#: Block - BT: 0 ms
│ └╴#: Statement - BT: 0 ms
│ │ ├╴#: Expression - BT: 0 ms
│ │ │ ├╴#: CallExpressionNode - BT: 0 ms
│ │ │ │ ├╴#: LeftParenLiteral - (
│ │ │ │ ├╴#: LeftParenLiteral - (
│ │ │ │ ├╴#: ExpressionList - BT: 0 ms
│ │ │ │ │ └╴#: StringLiteral - test
│ │ │ │ ├╴#: RightParenLiteral - )
│ │ │ ├╴#: IdentifierLiteral - print
│ │ │ ├╴#: RightParenLiteral - )
------
KCreate commented 8 years ago

Fixed in #36