Mercurial > projects > dil
changeset 429:052cbacb1642
Fix: removed infinite loop when parsing static imports.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Wed, 03 Oct 2007 17:13:50 +0200 |
parents | 3751db263679 |
children | e6c759e151cd |
files | trunk/src/dil/Parser.d |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/trunk/src/dil/Parser.d Mon Oct 01 19:22:10 2007 +0200 +++ b/trunk/src/dil/Parser.d Wed Oct 03 17:13:50 2007 +0200 @@ -226,7 +226,7 @@ switch (peekNext()) { case T.Import: - goto case T.Import; + goto case_Import; case T.This: decl = parseStaticConstructorDeclaration(); break; @@ -244,6 +244,7 @@ } break; case T.Import: + case_Import: decl = parseImportDeclaration(); assert(decl && decl.kind == NodeKind.ImportDeclaration); imports ~= cast(ImportDeclaration)cast(void*)decl; @@ -821,6 +822,8 @@ nT(); } + assert(token.type == T.Import); + ModuleFQN[] moduleFQNs; Token*[] moduleAliases; Token*[] bindNames;