ceylon / ceylon.ast

Apache License 2.0
18 stars 3 forks source link

Different member operators #58

Closed lucaswerkmeister closed 10 years ago

lucaswerkmeister commented 10 years ago

How do we represent the different member operators ., ?., *.? Probably through a child of QualifiedExpression, but I need to check if we use QualifiedExpression anywhere where only the regular member operator is allowed.

lucaswerkmeister commented 10 years ago

The alternative would be:

(names may change)

If it turns out that we do use QualifiedExpression in places where other member operators aren’t allowed, we’ll probably have to use this variant instead.

lucaswerkmeister commented 10 years ago

Okay, so it seems we’re not using QualifiedExpression anywhere else. In that case, the remaining question is just the names of the additional child.

The RedHat AST has:

However, we don’t really use abbreviations elsewhere in ceylon.ast (our operator expressions are called XOperation instead of XOp) – perhaps with the exception of LIdentifier, UIdentifier – so we should find a better naming scheme.

lucaswerkmeister commented 10 years ago

I think it’s best to stick to the compiler’s design and just have a child of QualifiedExpression.

Naming suggestion: