use of org.eclipse.xsemantics.runtime.ErrorInformation 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.ErrorInformation 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;
}
}
use of org.eclipse.xsemantics.runtime.ErrorInformation in project n4js by eclipse.
the class InternalTypeSystem method typeImpl.
protected Result<TypeRef> typeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final FunctionExpression e) throws RuleFailedException {
try {
final RuleApplicationTrace _subtrace_ = newTrace(_trace_);
final Result<TypeRef> _result_ = applyRuleTypeFunctionExpression(G, _subtrace_, e);
addToTrace(_trace_, new Provider<Object>() {
public Object get() {
return ruleName("typeFunctionExpression") + stringRepForEnv(G) + " |- " + stringRep(e) + " : " + stringRep(_result_.getFirst());
}
});
addAsSubtrace(_trace_, _subtrace_);
return _result_;
} catch (Exception e_applyRuleTypeFunctionExpression) {
typeThrowException(ruleName("typeFunctionExpression") + stringRepForEnv(G) + " |- " + stringRep(e) + " : " + "TypeRef", TYPEFUNCTIONEXPRESSION, e_applyRuleTypeFunctionExpression, e, new ErrorInformation[] { new ErrorInformation(e) });
return null;
}
}
use of org.eclipse.xsemantics.runtime.ErrorInformation in project n4js by eclipse.
the class InternalTypeSystem method typeImpl.
protected Result<TypeRef> typeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final NewTarget nt) throws RuleFailedException {
try {
final RuleApplicationTrace _subtrace_ = newTrace(_trace_);
final Result<TypeRef> _result_ = applyRuleTypeNewTarget(G, _subtrace_, nt);
addToTrace(_trace_, new Provider<Object>() {
public Object get() {
return ruleName("typeNewTarget") + stringRepForEnv(G) + " |- " + stringRep(nt) + " : " + stringRep(_result_.getFirst());
}
});
addAsSubtrace(_trace_, _subtrace_);
return _result_;
} catch (Exception e_applyRuleTypeNewTarget) {
typeThrowException(ruleName("typeNewTarget") + stringRepForEnv(G) + " |- " + stringRep(nt) + " : " + "TypeRef", TYPENEWTARGET, e_applyRuleTypeNewTarget, nt, new ErrorInformation[] { new ErrorInformation(nt) });
return null;
}
}
use of org.eclipse.xsemantics.runtime.ErrorInformation in project n4js by eclipse.
the class InternalTypeSystem method substTypeVariablesImpl.
protected Result<TypeArgument> substTypeVariablesImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final TypeArgument type) throws RuleFailedException {
try {
final RuleApplicationTrace _subtrace_ = newTrace(_trace_);
final Result<TypeArgument> _result_ = applyRuleSubstTypeVariablesBaseCase(G, _subtrace_, type);
addToTrace(_trace_, new Provider<Object>() {
public Object get() {
return ruleName("substTypeVariablesBaseCase") + stringRepForEnv(G) + " |- " + stringRep(type) + " ~> " + stringRep(_result_.getFirst());
}
});
addAsSubtrace(_trace_, _subtrace_);
return _result_;
} catch (Exception e_applyRuleSubstTypeVariablesBaseCase) {
substTypeVariablesThrowException(ruleName("substTypeVariablesBaseCase") + stringRepForEnv(G) + " |- " + stringRep(type) + " ~> " + "TypeArgument", SUBSTTYPEVARIABLESBASECASE, e_applyRuleSubstTypeVariablesBaseCase, type, new ErrorInformation[] { new ErrorInformation(type) });
return null;
}
}
Aggregations