use of cfml.parsing.ParserTag in project CFLint by cflint.
the class CFLint method process.
public void process(final String src, final String filename) throws ParseException, IOException {
fireStartedProcessing(filename);
final CFMLSource cfmlSource = new CFMLSource(src != null && src.contains("<!---") ? CommentReformatting.wrap(src) : src);
final ParserTag firstTag = getFirstTagQuietly(cfmlSource);
final List<Element> elements = new ArrayList<Element>();
if (firstTag != null) {
elements.addAll(cfmlSource.getChildElements());
}
if (src.contains("component") && (elements.isEmpty() || elements.get(0).getBegin() > src.indexOf("component"))) {
// Check if pure cfscript
final CFScriptStatement scriptStatement = cfmlParser.parseScript(src);
Context context = new Context(filename, null, null, false, handler, scriptStatement.getTokens());
process(scriptStatement, context);
} else {
processStack(elements, " ", filename, null);
}
fireFinishedProcessing(filename);
}
Aggregations