}
}
if (functionFound != null) {
int lastReturnedLine = it.getLastReturnedLine();
NameTok nameTok = createNameTok(functionFound, lastReturnedLine, NameTok.FunctionName, ps);
if (nameTok != null) {
FunctionDef functionDef = createFunctionDef(lastReturnedLine, nameTok,
PySelection.getFirstCharPosition(line));
if (!addStatement(body, functionDef)) {
return body;
}
if (stopOnFirstMatch) {
return body;
}
}
continue;
}
classMatcher.reset(line);
if (classMatcher.find()) {
int lastReturnedLine = it.getLastReturnedLine();
NameTok nameTok = createNameTok(classMatcher, lastReturnedLine, NameTok.ClassName, ps);
if (nameTok != null) {
ClassDef classDef = createClassDef(lastReturnedLine, nameTok,
PySelection.getFirstCharPosition(line));