QmlJS: Support .import directives in js files.

* Allow .import...
* Fix parsing of JS files when using Lexer::scanDirectives()
* Clean up ImportInfo construction.
* Rename ImportInfo::id to ImportInfo::as.

Change-Id: I888da248f06dc6184db99aa74c3b50d7f2f5e491
Reviewed-on: http://codereview.qt-project.org/5625
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
Christian Kamm
2011-09-27 15:12:22 +02:00
parent faa792f3cd
commit 82cbd0a974
10 changed files with 186 additions and 95 deletions

View File

@@ -113,7 +113,7 @@ double integerFromString(const QString &str, int radix)
Engine::Engine()
: _lexer(0)
: _lexer(0), _directives(0)
{ }
Engine::~Engine()
@@ -134,6 +134,12 @@ Lexer *Engine::lexer() const
void Engine::setLexer(Lexer *lexer)
{ _lexer = lexer; }
void Engine::setDirectives(Directives *directives)
{ _directives = directives; }
Directives *Engine::directives() const
{ return _directives; }
MemoryPool *Engine::pool()
{ return &_pool; }