public static boolean isConstructorName(String name) {
int p = name.lastIndexOf('.');
char firstChar = name.charAt(p<0 ? 0 : p+1);
- return Character.isUpperCase(firstChar);
+ return Character.isUpperCase(firstChar) || firstChar == '(';
}
/* Tries to resolve name as a local variable. It is assumed
if(deprecatedDescription != null)
errorLog.logWarning(location, "Deprecated value " + value.getName().name + "." + (deprecatedDescription.isEmpty() ? "" : " " + deprecatedDescription));
if(moduleDebugInfo != null)
- moduleDebugInfo.symbolReferences.add(new SymbolReference(value.getName(), definitionName, location));
+ moduleDebugInfo.symbolReferences.add(new SymbolReference(value.getName(), Name.create(compilationContext.module.getName(), definitionName), location));
return new EConstant(location, value);
} catch (AmbiguousNameException e) {
if(SCLCompilerConfiguration.ALLOW_OVERLOADING)
EConstant expression = new EConstant(altValue);
expression.location = location;
if(moduleDebugInfo != null)
- moduleDebugInfo.symbolReferences.add(new SymbolReference(altValue.getName(), definitionName, location));
+ moduleDebugInfo.symbolReferences.add(new SymbolReference(altValue.getName(), Name.create(compilationContext.module.getName(), definitionName), location));
return expression;
}
chrConstraintFrames.add(chrConstraintEntries.size());
}
- public void popCHRConstraintFrame(ArrayList<CHRConstraint> constraints) {
+ public void popCHRConstraintFrame(CHRRuleset ruleset) {
int frame = chrConstraintFrames.removeAt(chrConstraintFrames.size()-1);
int i = chrConstraintEntries.size();
while(i > frame) {
else
newConstraint = chrConstraints.put(entry.name, entry.constraint);
if(newConstraint.implicitlyDeclared)
- constraints.add(newConstraint);
+ ruleset.addConstraint(newConstraint);
}
}