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 IndexedAccessExpression expr) throws RuleFailedException {
try {
final RuleApplicationTrace _subtrace_ = newTrace(_trace_);
final Result<TypeRef> _result_ = applyRuleTypeIndexedAccessExpression(G, _subtrace_, expr);
addToTrace(_trace_, new Provider<Object>() {
public Object get() {
return ruleName("typeIndexedAccessExpression") + stringRepForEnv(G) + " |- " + stringRep(expr) + " : " + stringRep(_result_.getFirst());
}
});
addAsSubtrace(_trace_, _subtrace_);
return _result_;
} catch (Exception e_applyRuleTypeIndexedAccessExpression) {
typeThrowException(ruleName("typeIndexedAccessExpression") + stringRepForEnv(G) + " |- " + stringRep(expr) + " : " + "TypeRef", TYPEINDEXEDACCESSEXPRESSION, e_applyRuleTypeIndexedAccessExpression, expr, new ErrorInformation[] { new ErrorInformation(expr) });
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 PromisifyExpression e) throws RuleFailedException {
try {
final RuleApplicationTrace _subtrace_ = newTrace(_trace_);
final Result<TypeRef> _result_ = applyRuleTypePromisifyExpression(G, _subtrace_, e);
addToTrace(_trace_, new Provider<Object>() {
public Object get() {
return ruleName("typePromisifyExpression") + stringRepForEnv(G) + " |- " + stringRep(e) + " : " + stringRep(_result_.getFirst());
}
});
addAsSubtrace(_trace_, _subtrace_);
return _result_;
} catch (Exception e_applyRuleTypePromisifyExpression) {
typeThrowException(ruleName("typePromisifyExpression") + stringRepForEnv(G) + " |- " + stringRep(e) + " : " + "TypeRef", TYPEPROMISIFYEXPRESSION, e_applyRuleTypePromisifyExpression, e, new ErrorInformation[] { new ErrorInformation(e) });
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 Argument argument, final Expression argumentExpression) throws RuleFailedException {
try {
final RuleApplicationTrace _subtrace_ = newTrace(_trace_);
final Result<TypeRef> _result_ = applyRuleExpectedTypeOfArgument(G, _subtrace_, argument, argumentExpression);
addToTrace(_trace_, new Provider<Object>() {
public Object get() {
return ruleName("expectedTypeOfArgument") + stringRepForEnv(G) + " |- " + stringRep(argument) + " |> " + stringRep(argumentExpression) + " : " + stringRep(_result_.getFirst());
}
});
addAsSubtrace(_trace_, _subtrace_);
return _result_;
} catch (Exception e_applyRuleExpectedTypeOfArgument) {
expectedTypeInThrowException(ruleName("expectedTypeOfArgument") + stringRepForEnv(G) + " |- " + stringRep(argument) + " |> " + stringRep(argumentExpression) + " : " + "TypeRef", EXPECTEDTYPEOFARGUMENT, e_applyRuleExpectedTypeOfArgument, argument, argumentExpression, new ErrorInformation[] { new ErrorInformation(argument), new ErrorInformation(argumentExpression) });
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 StringLiteral l) throws RuleFailedException {
try {
final RuleApplicationTrace _subtrace_ = newTrace(_trace_);
final Result<TypeRef> _result_ = applyRuleTypeStringLiteral(G, _subtrace_, l);
addToTrace(_trace_, new Provider<Object>() {
public Object get() {
return ruleName("typeStringLiteral") + stringRepForEnv(G) + " |- " + stringRep(l) + " : " + stringRep(_result_.getFirst());
}
});
addAsSubtrace(_trace_, _subtrace_);
return _result_;
} catch (Exception e_applyRuleTypeStringLiteral) {
typeThrowException(ruleName("typeStringLiteral") + stringRepForEnv(G) + " |- " + stringRep(l) + " : " + "ParameterizedTypeRef", TYPESTRINGLITERAL, e_applyRuleTypeStringLiteral, l, new ErrorInformation[] { new ErrorInformation(l) });
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 CatchVariable catchVariable) throws RuleFailedException {
try {
final RuleApplicationTrace _subtrace_ = newTrace(_trace_);
final Result<TypeRef> _result_ = applyRuleTypeCatchVariable(G, _subtrace_, catchVariable);
addToTrace(_trace_, new Provider<Object>() {
public Object get() {
return ruleName("typeCatchVariable") + stringRepForEnv(G) + " |- " + stringRep(catchVariable) + " : " + stringRep(_result_.getFirst());
}
});
addAsSubtrace(_trace_, _subtrace_);
return _result_;
} catch (Exception e_applyRuleTypeCatchVariable) {
typeThrowException(ruleName("typeCatchVariable") + stringRepForEnv(G) + " |- " + stringRep(catchVariable) + " : " + "ParameterizedTypeRef", TYPECATCHVARIABLE, e_applyRuleTypeCatchVariable, catchVariable, new ErrorInformation[] { new ErrorInformation(catchVariable) });
return null;
}
}
Aggregations