mirror of
https://github.com/github/semantic.git
synced 2024-12-20 21:31:48 +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.
22 lines
321 B
Plaintext
22 lines
321 B
Plaintext
(Program
|
|
(For
|
|
(Assignment
|
|
(Identifier)
|
|
(Float))
|
|
(LessThan
|
|
(Identifier)
|
|
(Float))
|
|
(Update
|
|
(Identifier))
|
|
(
|
|
(If
|
|
(Equal
|
|
(Identifier)
|
|
(Float))
|
|
(
|
|
(Break
|
|
(Empty)))
|
|
(Empty))
|
|
(Empty)
|
|
(Identifier))))
|