* cs-tokenizer.cs: Small fix, because decimal_digits is used in a
context where we need a 2-character lookahead.
svn path=/trunk/mcs/; revision=9387
2002-12-04 Miguel de Icaza <miguel@ximian.com>
+ * cs-tokenizer.cs: Small fix, because decimal_digits is used in a
+ context where we need a 2-character lookahead.
+
* pending.cs (PendingImplementation): Rework so we can keep track
of interface types all the time, and flag those which were
implemented by parents as optional.
\r
if (c != -1)\r
number_builder.Append ((char) c);\r
- \r
- while ((d = peekChar ()) != -1){\r
+\r
+ //\r
+ // We use peekChar2, because decimal_digits needs to do a \r
+ // 2-character look-ahead (5.ToString for example).\r
+ //\r
+ while ((d = peekChar2 ()) != -1){\r
if (d >= '0' && d <= '9'){\r
number_builder.Append ((char) d);\r
getChar ();\r
return putback_char;\r
}\r
\r
+ int peekChar2 ()\r
+ {\r
+ if (putback_char != -1)\r
+ return putback_char;\r
+ return reader.Peek ();\r
+ }\r
+ \r
void putback (int c)\r
{\r
if (putback_char != -1){\r