0
我想了解我找到的xtext語法(下文)。我有兩個問題:xext語法與選擇的謂詞
- XFeatureCall有返回類型XExpression,但這被{XFeatureCall}否決,所以我可以設置「返回XFeatureCall」以及?或者是否真的有必要這樣做?
- 第8行和第14行以「=>」開頭。這些「選擇謂詞」還是其他迄今尚未引起我注意的事情?我無法在xtext文檔中找到所選謂詞的這種變體。所以,我希望在其應用中作出澄清。
XTEXT語法:
StaticEquals:':=';
XFeatureCall returns XExpression:
// Same as Xbase...
{XFeatureCall}
(declaringType=[JvmDeclaredType|StaticQualifier])?
('<' typeArguments+=JvmArgumentTypeReference (',' typeArguments+=JvmArgumentTypeReference)* '>')?
(feature=[JvmIdentifiableElement|IdOrSuper]|'class')
(=>explicitOperationCall?='('
(
featureCallArguments+=XShortClosure
| featureCallArguments+=XExpression (',' featureCallArguments+=XExpression)*
)?
')')?
=>featureCallArguments+=XClosure?
// ... Except with this additional optional clause that allows static members to be set with := operator
({XAssignment.assignable = current} StaticEquals value = XAssignment)?;