use of org.eclipse.xsemantics.runtime.Result in project n4js by eclipse.
the class InternalTypeSystem method applyRuleTypeN4ClassExpression.
protected Result<TypeRef> applyRuleTypeN4ClassExpression(final RuleEnvironment G, final RuleApplicationTrace _trace_, final N4ClassExpression e) throws RuleFailedException {
// output parameter
TypeRef T = null;
T = this.applyRuleTypeTypeDefiningElement(G, _trace_, e).getValue();
return new Result<TypeRef>(T);
}
use of org.eclipse.xsemantics.runtime.Result in project n4js by eclipse.
the class InternalTypeSystem method applyRuleExpectedTypeInFormalParameter.
protected Result<TypeRef> applyRuleExpectedTypeInFormalParameter(final RuleEnvironment G, final RuleApplicationTrace _trace_, final FormalParameter formalParam, final Expression initializer) throws RuleFailedException {
// output parameter
TypeRef T = null;
TypeRef _declaredTypeRef = formalParam.getDeclaredTypeRef();
boolean _tripleNotEquals = (_declaredTypeRef != null);
if (_tripleNotEquals) {
T = formalParam.getDeclaredTypeRef();
} else {
TFormalParameter _definedTypeElement = formalParam.getDefinedTypeElement();
TypeRef _typeRef = null;
if (_definedTypeElement != null) {
_typeRef = _definedTypeElement.getTypeRef();
}
boolean _tripleNotEquals_1 = (_typeRef != null);
if (_tripleNotEquals_1) {
T = formalParam.getDefinedTypeElement().getTypeRef();
} else {
T = RuleEnvironmentExtensions.anyTypeRef(G);
}
}
return new Result<TypeRef>(T);
}
use of org.eclipse.xsemantics.runtime.Result in project n4js by eclipse.
the class InternalTypeSystem method applyRuleUpperBoundFunctionTypeExprOrRef.
protected Result<TypeRef> applyRuleUpperBoundFunctionTypeExprOrRef(final RuleEnvironment G, final RuleApplicationTrace _trace_, final FunctionTypeExprOrRef F) throws RuleFailedException {
// output parameter
TypeRef T = null;
T = this.typeSystemHelper.createUpperBoundOfFunctionTypeExprOrRef(G, F);
return new Result<TypeRef>(T);
}
use of org.eclipse.xsemantics.runtime.Result in project n4js by eclipse.
the class InternalTypeSystem method applyRuleExpectedTypeInExpressionStatement.
protected Result<TypeRef> applyRuleExpectedTypeInExpressionStatement(final RuleEnvironment G, final RuleApplicationTrace _trace_, final ExpressionStatement exprStmnt, final Expression expression) throws RuleFailedException {
// output parameter
TypeRef T = null;
ArrowFunction _containingSingleExpressionArrowFunction = N4JSASTUtils.getContainingSingleExpressionArrowFunction(expression);
boolean _tripleNotEquals = (_containingSingleExpressionArrowFunction != null);
if (_tripleNotEquals) {
T = this.typeSystemHelper.getExpectedTypeOfReturnValueExpression(G, expression);
} else {
T = null;
}
return new Result<TypeRef>(T);
}
use of org.eclipse.xsemantics.runtime.Result in project n4js by eclipse.
the class InternalTypeSystem method applyRuleTypeTField.
protected Result<TypeRef> applyRuleTypeTField(final RuleEnvironment G, final RuleApplicationTrace _trace_, final TField tfield) throws RuleFailedException {
// output parameter
TypeRef T = null;
T = tfield.getTypeRef();
return new Result<TypeRef>(T);
}
Aggregations