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 ForStatement forStmnt, final Expression expression) throws RuleFailedException {
try {
final RuleApplicationTrace _subtrace_ = newTrace(_trace_);
final Result<TypeRef> _result_ = applyRuleExpectedTypeInForStatement(G, _subtrace_, forStmnt, expression);
addToTrace(_trace_, new Provider<Object>() {
public Object get() {
return ruleName("expectedTypeInForStatement") + stringRepForEnv(G) + " |- " + stringRep(forStmnt) + " |> " + stringRep(expression) + " : " + stringRep(_result_.getFirst());
}
});
addAsSubtrace(_trace_, _subtrace_);
return _result_;
} catch (Exception e_applyRuleExpectedTypeInForStatement) {
expectedTypeInThrowException(ruleName("expectedTypeInForStatement") + stringRepForEnv(G) + " |- " + stringRep(forStmnt) + " |> " + stringRep(expression) + " : " + "TypeRef", EXPECTEDTYPEINFORSTATEMENT, e_applyRuleExpectedTypeInForStatement, forStmnt, expression, new ErrorInformation[] { new ErrorInformation(forStmnt), 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 N4FieldDeclaration fieldDecl) throws RuleFailedException {
try {
final RuleApplicationTrace _subtrace_ = newTrace(_trace_);
final Result<TypeRef> _result_ = applyRuleTypeN4FieldDeclaration(G, _subtrace_, fieldDecl);
addToTrace(_trace_, new Provider<Object>() {
public Object get() {
return ruleName("typeN4FieldDeclaration") + stringRepForEnv(G) + " |- " + stringRep(fieldDecl) + " : " + stringRep(_result_.getFirst());
}
});
addAsSubtrace(_trace_, _subtrace_);
return _result_;
} catch (Exception e_applyRuleTypeN4FieldDeclaration) {
typeThrowException(ruleName("typeN4FieldDeclaration") + stringRepForEnv(G) + " |- " + stringRep(fieldDecl) + " : " + "TypeRef", TYPEN4FIELDDECLARATION, e_applyRuleTypeN4FieldDeclaration, fieldDecl, new ErrorInformation[] { new ErrorInformation(fieldDecl) });
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 GetterDeclaration getter) throws RuleFailedException {
try {
final RuleApplicationTrace _subtrace_ = newTrace(_trace_);
final Result<TypeRef> _result_ = applyRuleTypeGetterDeclaration(G, _subtrace_, getter);
addToTrace(_trace_, new Provider<Object>() {
public Object get() {
return ruleName("typeGetterDeclaration") + stringRepForEnv(G) + " |- " + stringRep(getter) + " : " + stringRep(_result_.getFirst());
}
});
addAsSubtrace(_trace_, _subtrace_);
return _result_;
} catch (Exception e_applyRuleTypeGetterDeclaration) {
typeThrowException(ruleName("typeGetterDeclaration") + stringRepForEnv(G) + " |- " + stringRep(getter) + " : " + "TypeRef", TYPEGETTERDECLARATION, e_applyRuleTypeGetterDeclaration, getter, new ErrorInformation[] { new ErrorInformation(getter) });
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 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.ErrorInformation 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;
}
}
Aggregations