visitName(name);
//Check if the name was actually found in some way...
TokenFoundStructure found = popFound();
if (found != null && found.token instanceof SourceToken) {
final SourceToken sourceToken = (SourceToken) found.token;
if (found.defined) {
argumentsChecker.checkNameFound(callNode, sourceToken);
} else if (found.found != null) {
//Still not found: register a callback to be called if it's found later on.
found.found.registerCallOnDefined(new ICallbackListener<Found>() {
public Object call(Found f) {
try {
List<GenAndTok> all = f.getAll();
for (GenAndTok genAndTok : all) {
if (genAndTok.tok instanceof SourceToken) {
SourceToken sourceToken2 = (SourceToken) genAndTok.tok;
if (sourceToken2.getAst() instanceof FunctionDef
|| sourceToken2.getAst() instanceof ClassDef) {
argumentsChecker.checkNameFound(callNode, sourceToken2);
return null;
}
}
}