| 361 | } |
| 362 | |
| 363 | AbstractNodeListPtr ScriptCompiler::_generateAST( const String &str, const String &source, |
| 364 | bool doImports, bool doObjects, bool doVariables ) |
| 365 | { |
| 366 | // Clear the past errors |
| 367 | mErrors.clear(); |
| 368 | |
| 369 | ScriptLexer lexer; |
| 370 | ScriptParser parser; |
| 371 | ConcreteNodeListPtr cst = parser.parse( lexer.tokenize( str ), source ); |
| 372 | |
| 373 | // Call the listener to intercept CST |
| 374 | if( mListener ) |
| 375 | mListener->preConversion( this, cst ); |
| 376 | |
| 377 | // Convert our nodes to an AST |
| 378 | AbstractNodeListPtr ast = convertToAST( cst ); |
| 379 | |
| 380 | if( ast && doImports ) |
| 381 | processImports( ast ); |
| 382 | if( ast && doObjects ) |
| 383 | processObjects( ast.get(), ast ); |
| 384 | if( ast && doVariables ) |
| 385 | processVariables( ast.get() ); |
| 386 | |
| 387 | return ast; |
| 388 | } |
| 389 | |
| 390 | bool ScriptCompiler::_compile( AbstractNodeListPtr nodes, const String &group, bool doImports, |
| 391 | bool doObjects, bool doVariables ) |
nothing calls this directly
no test coverage detected