[svn] r6458: nemerle/trunk/ncc/parsing/PreParser.n
VladD2
svnadmin at nemerle.org
Fri Jul 21 12:18:25 CEST 2006
Log:
Refactoring: Extract parsing of "using directive" into local function.
Author: VladD2
Date: Fri Jul 21 12:18:23 2006
New Revision: 6458
Modified:
nemerle/trunk/ncc/parsing/PreParser.n
Modified: nemerle/trunk/ncc/parsing/PreParser.n
==============================================================================
--- nemerle/trunk/ncc/parsing/PreParser.n (original)
+++ nemerle/trunk/ncc/parsing/PreParser.n Fri Jul 21 12:18:23 2006
@@ -362,13 +362,9 @@
}
}
- def loop () {
- def tok = get_token ();
-
- match (tok) {
- | Token.Keyword ("using") =>
+ def parse_using_directive (tok)
+ {
finish_current (current_begin);
-
def oldEnv = Env;
def (id, idLoc) = get_qualified_identifier ();
@@ -408,8 +404,15 @@
lexer.Manager.OnAfterUsingDirectiveParse(tok.Location + lexer.Location,
id, idLoc, oldEnv, Env);
}
+
finish_current (current_begin);
- loop ()
+ }
+
+ def loop () {
+ def tok = get_token ();
+
+ match (tok) {
+ | Token.Keyword ("using") => parse_using_directive (tok); loop ()
| Token.Keyword ("namespace") =>
finish_current (current_begin);
More information about the svn
mailing list