private static void initDefinition(PDefinition result, Pass values, ILexLocation location, ILexNameToken name, NameScope scope) { result.setPass(values); result.setLocation(location); result.setName(name); result.setNameScope(scope); result.setAccess(getDefaultAccessSpecifier()); result.setUsed(false); }
public POFunctionResultContext(AExplicitFunctionDefinition definition) { this.name = definition.getName(); this.deftype = (AFunctionType) definition.getType(); this.precondition = definition.getPrecondition(); this.body = definition.getBody(); this.implicit = false; this.result = AstFactory.newAPatternTypePair(AstFactory.newAIdentifierPattern(new LexNameToken(definition.getName().getModule(), "RESULT", definition.getLocation())), ((AFunctionType) definition.getType()).getResult().clone()); this.function = definition.clone(); function.setLocation(null); }