[svn] r7517: nemerle/trunk/ncc/parsing/Lexer.n
iae
svnadmin at nemerle.org
Mon Mar 5 18:32:35 CET 2007
Log:
Per conversation with Michal
--
>> 1. Why syntax extension's keywords can not contain numeric symbols?
> I guess it's a bug.
Ok, I'll fix it.
Author: iae
Date: Mon Mar 5 18:32:33 2007
New Revision: 7517
Modified:
nemerle/trunk/ncc/parsing/Lexer.n
Modified: nemerle/trunk/ncc/parsing/Lexer.n
==============================================================================
--- nemerle/trunk/ncc/parsing/Lexer.n (original)
+++ nemerle/trunk/ncc/parsing/Lexer.n Mon Mar 5 18:32:33 2007
@@ -1514,12 +1514,14 @@
public static HasKeywordChars (str : string) : bool
{
- def len = str.Length - 1;
- foreach (i in [0 .. len])
- unless (Char.IsLetter (str[i]) || str[i] == '_')
- Nemerle.Imperative.Return (false);
+ return : {
+ foreach (c in str) {
+ unless (Char.IsLetterOrDigit(c) || c == '_')
+ return(false);
+ }
true
}
+ }
} // end class LexerBase
public class LexerFile : LexerBase
More information about the svn
mailing list