|How to imply a value for a field via the grammar [message #1033457]
||Thu, 04 April 2013 08:42
| Chris Ainsley
Registered: March 2010
I have designed a DOM-like DSL, and created a basic XText definition.
(type=ID name=STRING )
NodeWithoutId returns Node:
( (type=ID ))
The 'type' field represents the type of a node, and the 'name' field represents the identifier of a field.
I have two types of node. One with an id and one without an ID, and I'm auto-generating the model from the .xtext file.
My question is, for NodeWithoutId, how do I set the name and the type field to the value of what is currently just the type field? That is, for Node, the name and type should be independent, but for the NodeWithoutId grammar, the name and the type should be one word in the grammar but the same value should be stored in both the name and the type fields.
Powered by FUDForum
. Page generated in 0.01572 seconds