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 CommaExpression e) throws RuleFailedException {
try {
final RuleApplicationTrace _subtrace_ = newTrace(_trace_);
final Result<TypeRef> _result_ = applyRuleTypeCommaExpression(G, _subtrace_, e);
addToTrace(_trace_, new Provider<Object>() {
public Object get() {
return ruleName("typeCommaExpression") + stringRepForEnv(G) + " |- " + stringRep(e) + " : " + stringRep(_result_.getFirst());
}
});
addAsSubtrace(_trace_, _subtrace_);
return _result_;
} catch (Exception e_applyRuleTypeCommaExpression) {
typeThrowException(ruleName("typeCommaExpression") + stringRepForEnv(G) + " |- " + stringRep(e) + " : " + "TypeRef", TYPECOMMAEXPRESSION, e_applyRuleTypeCommaExpression, e, new ErrorInformation[] { new ErrorInformation(e) });
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 ParameterizedPropertyAccessExpression expr) throws RuleFailedException {
try {
final RuleApplicationTrace _subtrace_ = newTrace(_trace_);
final Result<TypeRef> _result_ = applyRuleTypePropertyAccessExpression(G, _subtrace_, expr);
addToTrace(_trace_, new Provider<Object>() {
public Object get() {
return ruleName("typePropertyAccessExpression") + stringRepForEnv(G) + " |- " + stringRep(expr) + " : " + stringRep(_result_.getFirst());
}
});
addAsSubtrace(_trace_, _subtrace_);
return _result_;
} catch (Exception e_applyRuleTypePropertyAccessExpression) {
typeThrowException(ruleName("typePropertyAccessExpression") + stringRepForEnv(G) + " |- " + stringRep(expr) + " : " + "TypeRef", TYPEPROPERTYACCESSEXPRESSION, e_applyRuleTypePropertyAccessExpression, 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 CastExpression e) throws RuleFailedException {
try {
final RuleApplicationTrace _subtrace_ = newTrace(_trace_);
final Result<TypeRef> _result_ = applyRuleTypeCastExpression(G, _subtrace_, e);
addToTrace(_trace_, new Provider<Object>() {
public Object get() {
return ruleName("typeCastExpression") + stringRepForEnv(G) + " |- " + stringRep(e) + " : " + stringRep(_result_.getFirst());
}
});
addAsSubtrace(_trace_, _subtrace_);
return _result_;
} catch (Exception e_applyRuleTypeCastExpression) {
typeThrowException(ruleName("typeCastExpression") + stringRepForEnv(G) + " |- " + stringRep(e) + " : " + "TypeRef", TYPECASTEXPRESSION, e_applyRuleTypeCastExpression, e, new ErrorInformation[] { new ErrorInformation(e) });
return null;
}
}
use of org.eclipse.xsemantics.runtime.RuleApplicationTrace in project n4js by eclipse.
the class InternalTypeSystem method upperBoundImpl.
protected Result<TypeRef> upperBoundImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final FunctionTypeExprOrRef F) throws RuleFailedException {
try {
final RuleApplicationTrace _subtrace_ = newTrace(_trace_);
final Result<TypeRef> _result_ = applyRuleUpperBoundFunctionTypeExprOrRef(G, _subtrace_, F);
addToTrace(_trace_, new Provider<Object>() {
public Object get() {
return ruleName("upperBoundFunctionTypeExprOrRef") + stringRepForEnv(G) + " |~ " + stringRep(F) + " /\\ " + stringRep(_result_.getFirst());
}
});
addAsSubtrace(_trace_, _subtrace_);
return _result_;
} catch (Exception e_applyRuleUpperBoundFunctionTypeExprOrRef) {
upperBoundThrowException(ruleName("upperBoundFunctionTypeExprOrRef") + stringRepForEnv(G) + " |~ " + stringRep(F) + " /\\ " + "TypeRef", UPPERBOUNDFUNCTIONTYPEEXPRORREF, e_applyRuleUpperBoundFunctionTypeExprOrRef, F, new ErrorInformation[] { new ErrorInformation(F) });
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 YieldExpression y) throws RuleFailedException {
try {
final RuleApplicationTrace _subtrace_ = newTrace(_trace_);
final Result<TypeRef> _result_ = applyRuleTypeYieldExpression(G, _subtrace_, y);
addToTrace(_trace_, new Provider<Object>() {
public Object get() {
return ruleName("typeYieldExpression") + stringRepForEnv(G) + " |- " + stringRep(y) + " : " + stringRep(_result_.getFirst());
}
});
addAsSubtrace(_trace_, _subtrace_);
return _result_;
} catch (Exception e_applyRuleTypeYieldExpression) {
typeThrowException(ruleName("typeYieldExpression") + stringRepForEnv(G) + " |- " + stringRep(y) + " : " + "TypeRef", TYPEYIELDEXPRESSION, e_applyRuleTypeYieldExpression, y, new ErrorInformation[] { new ErrorInformation(y) });
return null;
}
}
Aggregations