Open KvanTTT opened 7 years ago
Hi, I see there has not been any change? Is it possible to work on this fix?
I don't think so becuase firstly we should choose a format for parsing tree rendering. It should be lightweight and convenient for machine comparison. I suggest the following one, without parentheses:
propertyDeclaration
VAL("val")
variableDeclaration
simpleIdentifier
Identifier("result")
ASSIGNMENT("=")
expression
disjunction
conjunction
equality
comparison
infixOperation
elvisExpression
infixFunctionCall
rangeExpression
additiveExpression
multiplicativeExpression
asExpression
prefixUnaryExpression
postfixUnaryExpression
primaryExpression
simpleIdentifier
Identifier("ArrayList")
DOT(".")
THIS("this")
DOT(".")
Identifier("remove")
LPAREN("(")
Identifier("index")
SUB("-")
IntegerLiteral("1")
RPAREN(")")
It improves and simplifies diff for .tree files. See also https://github.com/antlr/grammars-v4/issues/748 and https://github.com/antlr/antlr4/issues/1502.