Closed lucaswerkmeister closed 10 years ago
I don't know if it makes a lot of sense to use ANTLR there, though...
For convenience, I'm putting the currently generated version of the file into the wiki here. I'll try and update it from time to time.
FormattingOptions.ceylon contains a lot of duplicate code; nearly the whole file could be auto-generated from the following information per attribute:
e.g., for
indentMode
,would be sufficient. From this, we would then generate
"<doc>" shared formal <type>? <name>;
forSparseFormattingOptions
;shared actual formal <type> <name>;
forFormattingOptions
;for
CombinedFormattingOptions
;<name> = <default>
fordefaultOptions
.The tree-related classes of
ceylon-spec
are auto-generated using an ANTLR grammar (treegen); we could do something similar here.