How to reference a set of Strings #322
paulfrench
started this conversation in
General
Replies: 1 comment 1 reply
-
Hi @paulfrench, we removed Enums in favor of using data type rules. They were already interchangeable in Xtext and due to some additional generated types, we didn't see the need to have them in Langium. A corresponding data type rule would look like this:
This generates the type TargetPlatform = 'Azure' | 'AWS' | 'local'; |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to convert some Xtext to Langium, I've got several problems but let's deal with one at a time..
Application: 'application' '{' 'name' ':' name=STRING 'target-platform' ':' targetPlatform=TargetPlatform '}';
What do I set TargetPlatform to? In XText I could use an enum...
enum TargetPlatform: Azure | AWS | local;
enum does not seem to be supported.
Thanks
`
Beta Was this translation helpful? Give feedback.
All reactions