Closed lucaswerkmeister closed 10 years ago
How about this: No spaces around the operators if l+r expression are
Literal
(1..2
)BaseMemberExpression
(foo
)QualifiedMemberExpression
(foo.bar
)otherwise, spaces.
Or
Oh, right. So, Expression
with mainToken exists
.
No, Expression
with (mainToken?.text else "") == "("
. a - b
is an expression with a mainToken
as well.
Okay, the type hierarchy had me confused for a bit… most XYZExpression
classes don’t extend Expression
.
The condition is now term is Atom|Primary || (expr.mainToken?.text else "") == "("
. I’ll test a few ranges, and if it looks good, I’ll commit it.
No, that doesn’t make sense, an Expression
is an Atom
.
I guess this also applies to EntryOp
(1->2
).
Same for
:
and...
.