mirror of
https://github.com/github/semantic.git
synced 2024-12-23 23:11:50 +03:00
6f63463269
As @robrix pointed out, adding explicit parenthesis nodes to our ASTs bloats them with no added gain in expressivity. A pretty-printing solution should use something analogous to `showsPrec` to ensure that parentheses are printed properly.
30 lines
500 B
Plaintext
30 lines
500 B
Plaintext
(Program
|
|
(Function
|
|
(Empty)
|
|
(Empty)
|
|
(Identifier)
|
|
(RequiredParameter
|
|
(Empty)
|
|
(Empty)
|
|
(Empty)
|
|
(Assignment
|
|
(Identifier)
|
|
(Empty)))
|
|
(RequiredParameter
|
|
(Empty)
|
|
(Empty)
|
|
(Empty)
|
|
(Assignment
|
|
(Identifier)
|
|
(Empty)))
|
|
(
|
|
(DoWhile
|
|
{ (Identifier)
|
|
->(Identifier) }
|
|
(
|
|
(Call
|
|
(Identifier)
|
|
{ (Identifier)
|
|
->(Identifier) }
|
|
(Empty)))))))
|