@Test public void testNoArgs() throws ParseException { FunctionSignature f = fun("int", "Bob", "int", "a"); FunctionDefinitionDataType dt = parser.parse(f, "int Bob()"); assertEquals(0, dt.getArguments().length); }
public FunctionDefinitionDataType parse(FunctionSignature originalSignature, String signatureText) throws ParseException { dtMap.clear(); nameMap.clear(); if (originalSignature != null) { initDataTypeMap(originalSignature); signatureText = cleanUpSignatureText(signatureText, originalSignature); } String functionName = extractFunctionName(signatureText); FunctionDefinitionDataType function = new FunctionDefinitionDataType(functionName); function.setReturnType(extractReturnType(signatureText)); function.setArguments(extractArguments(signatureText)); function.setVarArgs(hasVarArgs(signatureText)); return function; }
FunctionSignatureParser { public FunctionDefinitionDataType parse(FunctionSignature originalSignature, String signatureText) throws ParseException { dtMap.clear(); nameMap.clear(); if (originalSignature != null) { initDataTypeMap(originalSignature); signatureText = cleanUpSignatureText(signatureText, originalSignature); } String functionName = extractFunctionName(signatureText); FunctionDefinitionDataType function = new FunctionDefinitionDataType(functionName); function.setReturnType(extractReturnType(signatureText)); function.setArguments(extractArguments(signatureText)); function.setVarArgs(hasVarArgs(signatureText)); return function; } }
FunctionSignatureParser { public FunctionDefinitionDataType parse(FunctionSignature originalSignature, String signatureText) throws ParseException { dtMap.clear(); nameMap.clear(); if (originalSignature != null) { initDataTypeMap(originalSignature); signatureText = cleanUpSignatureText(signatureText, originalSignature); } String functionName = extractFunctionName(signatureText); FunctionDefinitionDataType function = new FunctionDefinitionDataType(functionName); function.setReturnType(extractReturnType(signatureText)); function.setArguments(extractArguments(signatureText)); function.setVarArgs(hasVarArgs(signatureText)); return function; } FunctionSignatureParser(Program program, DataTypeManagerService service); }
FunctionSignatureParser { public FunctionDefinitionDataType parse(FunctionSignature originalSignature, String signatureText) throws ParseException { dtMap.clear(); nameMap.clear(); if (originalSignature != null) { initDataTypeMap(originalSignature); signatureText = cleanUpSignatureText(signatureText, originalSignature); } String functionName = extractFunctionName(signatureText); FunctionDefinitionDataType function = new FunctionDefinitionDataType(functionName); function.setReturnType(extractReturnType(signatureText)); function.setArguments(extractArguments(signatureText)); function.setVarArgs(hasVarArgs(signatureText)); return function; } FunctionSignatureParser(Program program, DataTypeManagerService service); FunctionDefinitionDataType parse(FunctionSignature originalSignature,
			String signatureText); }
FunctionSignatureParser { public FunctionDefinitionDataType parse(FunctionSignature originalSignature, String signatureText) throws ParseException { dtMap.clear(); nameMap.clear(); if (originalSignature != null) { initDataTypeMap(originalSignature); signatureText = cleanUpSignatureText(signatureText, originalSignature); } String functionName = extractFunctionName(signatureText); FunctionDefinitionDataType function = new FunctionDefinitionDataType(functionName); function.setReturnType(extractReturnType(signatureText)); function.setArguments(extractArguments(signatureText)); function.setVarArgs(hasVarArgs(signatureText)); return function; } FunctionSignatureParser(Program program, DataTypeManagerService service); FunctionDefinitionDataType parse(FunctionSignature originalSignature,
			String signatureText);  }