use of org.eclipse.xsemantics.runtime.RuleApplicationTrace in project n4js by eclipse.
the class InternalTypeSystem method typeImpl.
protected Result<TypeRef> typeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final TSetter tsetter) throws RuleFailedException {
try {
final RuleApplicationTrace _subtrace_ = newTrace(_trace_);
final Result<TypeRef> _result_ = applyRuleTypeTSetter(G, _subtrace_, tsetter);
addToTrace(_trace_, new Provider<Object>() {
public Object get() {
return ruleName("typeTSetter") + stringRepForEnv(G) + " |- " + stringRep(tsetter) + " : " + stringRep(_result_.getFirst());
}
});
addAsSubtrace(_trace_, _subtrace_);
return _result_;
} catch (Exception e_applyRuleTypeTSetter) {
typeThrowException(ruleName("typeTSetter") + stringRepForEnv(G) + " |- " + stringRep(tsetter) + " : " + "TypeRef", TYPETSETTER, e_applyRuleTypeTSetter, tsetter, new ErrorInformation[] { new ErrorInformation(tsetter) });
return null;
}
}
use of org.eclipse.xsemantics.runtime.RuleApplicationTrace in project n4js by eclipse.
the class InternalTypeSystem method typeImpl.
protected Result<TypeRef> typeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final ArrayElement e) throws RuleFailedException {
try {
final RuleApplicationTrace _subtrace_ = newTrace(_trace_);
final Result<TypeRef> _result_ = applyRuleTypeArrayElement(G, _subtrace_, e);
addToTrace(_trace_, new Provider<Object>() {
public Object get() {
return ruleName("typeArrayElement") + stringRepForEnv(G) + " |- " + stringRep(e) + " : " + stringRep(_result_.getFirst());
}
});
addAsSubtrace(_trace_, _subtrace_);
return _result_;
} catch (Exception e_applyRuleTypeArrayElement) {
typeThrowException(ruleName("typeArrayElement") + stringRepForEnv(G) + " |- " + stringRep(e) + " : " + "TypeRef", TYPEARRAYELEMENT, e_applyRuleTypeArrayElement, e, new ErrorInformation[] { new ErrorInformation(e) });
return null;
}
}
use of org.eclipse.xsemantics.runtime.RuleApplicationTrace in project n4js by eclipse.
the class InternalTypeSystem method subtypeImpl.
protected Result<Boolean> subtypeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final TypeRef left, final UnknownTypeRef right) throws RuleFailedException {
try {
final RuleApplicationTrace _subtrace_ = newTrace(_trace_);
final Result<Boolean> _result_ = applyRuleSubtypeUnknownTypeRef_Right(G, _subtrace_, left, right);
addToTrace(_trace_, new Provider<Object>() {
public Object get() {
return ruleName("subtypeUnknownTypeRef_Right") + stringRepForEnv(G) + " |- " + stringRep(left) + " <: " + stringRep(right);
}
});
addAsSubtrace(_trace_, _subtrace_);
return _result_;
} catch (Exception e_applyRuleSubtypeUnknownTypeRef_Right) {
subtypeThrowException(ruleName("subtypeUnknownTypeRef_Right") + stringRepForEnv(G) + " |- " + stringRep(left) + " <: " + stringRep(right), SUBTYPEUNKNOWNTYPEREF_RIGHT, e_applyRuleSubtypeUnknownTypeRef_Right, left, right, new ErrorInformation[] { new ErrorInformation(left), new ErrorInformation(right) });
return null;
}
}
use of org.eclipse.xsemantics.runtime.RuleApplicationTrace in project n4js by eclipse.
the class InternalTypeSystem method typeImpl.
protected Result<TypeRef> typeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final NumericLiteral l) throws RuleFailedException {
try {
final RuleApplicationTrace _subtrace_ = newTrace(_trace_);
final Result<TypeRef> _result_ = applyRuleTypeNumericLiteral(G, _subtrace_, l);
addToTrace(_trace_, new Provider<Object>() {
public Object get() {
return ruleName("typeNumericLiteral") + stringRepForEnv(G) + " |- " + stringRep(l) + " : " + stringRep(_result_.getFirst());
}
});
addAsSubtrace(_trace_, _subtrace_);
return _result_;
} catch (Exception e_applyRuleTypeNumericLiteral) {
typeThrowException(ruleName("typeNumericLiteral") + stringRepForEnv(G) + " |- " + stringRep(l) + " : " + "TypeRef", TYPENUMERICLITERAL, e_applyRuleTypeNumericLiteral, l, new ErrorInformation[] { new ErrorInformation(l) });
return null;
}
}
use of org.eclipse.xsemantics.runtime.RuleApplicationTrace in project n4js by eclipse.
the class InternalTypeSystem method expectedTypeInImpl.
protected Result<TypeRef> expectedTypeInImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final MultiplicativeExpression e, final Expression expression) throws RuleFailedException {
try {
final RuleApplicationTrace _subtrace_ = newTrace(_trace_);
final Result<TypeRef> _result_ = applyRuleExpectedTypeInMultiplicativeExpression(G, _subtrace_, e, expression);
addToTrace(_trace_, new Provider<Object>() {
public Object get() {
return ruleName("expectedTypeInMultiplicativeExpression") + stringRepForEnv(G) + " |- " + stringRep(e) + " |> " + stringRep(expression) + " : " + stringRep(_result_.getFirst());
}
});
addAsSubtrace(_trace_, _subtrace_);
return _result_;
} catch (Exception e_applyRuleExpectedTypeInMultiplicativeExpression) {
expectedTypeInThrowException(ruleName("expectedTypeInMultiplicativeExpression") + stringRepForEnv(G) + " |- " + stringRep(e) + " |> " + stringRep(expression) + " : " + "TypeRef", EXPECTEDTYPEINMULTIPLICATIVEEXPRESSION, e_applyRuleExpectedTypeInMultiplicativeExpression, e, expression, new ErrorInformation[] { new ErrorInformation(e), new ErrorInformation(expression) });
return null;
}
}
Aggregations