ceylon / ceylon.ast

Apache License 2.0
18 stars 3 forks source link

ConditionList → Conditions? #59

Closed lucaswerkmeister closed 10 years ago

lucaswerkmeister commented 10 years ago

We have several “collection” nodes, and some of them are called ThingList, while others are called Things. In my understanding, the rule of thumb to decide which to use was: If it’s a “complete” element, with surrounding tokens (if appropriate), then it’s a Things – e. g., PositionalArguments and NamedArguments include the surrounding parentheses / braces. On the other hand, if the surrounding elements are missing and/or the list is “auxiliary”, it’s a ThingList – e. g., ArgumentList is a comma-separated list of arguments, without surrounding tokens, used by both PositionalArguments and NamedArguments. Another example is TypeList, which is used for tuple types and callable types.

The third ThingList we currently have is ConditionList – but this does include the surrounding parentheses! Shouldn’t it be called Conditions then?

(This naming comes largely from the spec, which also has the same three ThingLists. @gavinking was this distinction intentional, or is it random?)

gavinking commented 10 years ago

The third ThingList we currently have is ConditionList – but this does include the surrounding parentheses! Shouldn’t it be called Conditions then?

Probably.