use of org.eclipse.xtext.AbstractRule in project xtext-core by eclipse.
the class TreeConstTest method testMultiAction1.
@Test
public void testMultiAction1() throws Exception {
AbstractRule rule = parseRule("Model: 'a' {Type1} | 'b' {Type2};");
assertTypes(nfa.getNFA(rule.getAlternatives()).getTypes(), "Type1", "Type2");
}
use of org.eclipse.xtext.AbstractRule in project xtext-core by eclipse.
the class TreeConstTest method testAssignedAction2.
@Test
public void testAssignedAction2() throws Exception {
AbstractRule rule = parseRule("Model: 'a' {Type1.sub=current} 'b' {Type2.sub=current};");
assertTypes(nfa.getNFA(rule.getAlternatives()).getTypes(), "Type2");
}
use of org.eclipse.xtext.AbstractRule in project xtext-core by eclipse.
the class TreeConstTest method testAssignedRuleCall.
@Test
public void testAssignedRuleCall() throws Exception {
AbstractRule rule = parseRule("Model: 'something' foo=Bar; Bar: name=ID;");
assertTypes(nfa.getNFA(rule.getAlternatives()).getTypes(), "Model");
}
use of org.eclipse.xtext.AbstractRule in project xtext-core by eclipse.
the class TreeConstTest method testSingleAction1.
@Test
public void testSingleAction1() throws Exception {
AbstractRule rule = parseRule("Model: 'someKeyword' {Model};");
assertTypes(nfa.getNFA(rule.getAlternatives()).getTypes(), "Model");
}
use of org.eclipse.xtext.AbstractRule in project xtext-core by eclipse.
the class TreeConstTest method testSingleAction2.
@Test
public void testSingleAction2() throws Exception {
AbstractRule rule = parseRule("Model: 'someKeyword' {TypeRestriction};");
assertTypes(nfa.getNFA(rule.getAlternatives()).getTypes(), "TypeRestriction");
}
Aggregations