FunctionDefinition buildDefinition() { String definitionName = getName(); // System.out.println("buildDefinition: " + definitionName); FunctionDefinition definition = createFunctionDefinition(definitionName); definition.setNode(this); fillInNamespaceAndModifiers(definition); fillInMetadata(definition); // Set the return type. If a type annotation doesn't appear in the source, // the return type in the definition will be "". IReference returnType = typeNode != null ? typeNode.computeTypeReference() : null; definition.setReturnTypeReference(returnType); definition.setTypeReference(ReferenceFactory.builtinReference(IASLanguageConstants.BuiltinType.FUNCTION)); setConstructorIfNeeded(definition); return definition; }
FunctionDefinition buildDefinition() { String definitionName = getName(); // System.out.println("buildDefinition: " + definitionName); FunctionDefinition definition = createFunctionDefinition(definitionName); definition.setNode(this); fillInNamespaceAndModifiers(definition); fillInMetadata(definition); // Set the return type. If a type annotation doesn't appear in the source, // the return type in the definition will be "". IReference returnType = typeNode != null ? typeNode.computeTypeReference() : null; definition.setReturnTypeReference(returnType); definition.setTypeReference(ReferenceFactory.builtinReference(IASLanguageConstants.BuiltinType.FUNCTION)); setConstructorIfNeeded(definition); return definition; }