Hi,

Attached is a patch that fixes an issue in the tokenizer that caused 
it to recognize label names at the start of continuation lines. An
example in which this would go wrong:

<MyAttribute(Arg1:=2, _
Arg2:="blah")> Sub Main()
End Main()

Where "Arg2" would be parsed as a LABELNAME by the tokenizer.

Cheers,

Jelmer
Index: ChangeLog
===================================================================
--- ChangeLog   (revision 53165)
+++ ChangeLog   (working copy)
@@ -1,3 +1,7 @@
+2005-11-18 Jelmer Vernooij <[EMAIL PROTECTED]>
+       * mb-tokenizer.cs: add fix so the tokenizer no longer parses label 
+       names at the start of continuation lines
+
 2005-11-09 Renato Suga <[EMAIL PROTECTED]>
        * mb-parser.jay: added STOP to statement rule to allow a keyword STOP
        in an iteration_statement.
Index: mb-tokenizer.cs
===================================================================
--- mb-tokenizer.cs     (revision 53165)
+++ mb-tokenizer.cs     (working copy)
@@ -924,8 +922,9 @@
                                        int d = peekChar();
                                        if 
(!is_identifier_part_character((char)d)) {
                                                while ((c = getChar ()) != -1 
&& !IsEOL(c)) {}
-                                               c = getChar ();                 
-                                       }               
+                                               c = getChar ();
+                                               tokens_seen = true;
+                                       }
                                }
                                        
                                
Index: Test/tests/attributes/Attributes.vb
===================================================================
--- Test/tests/attributes/Attributes.vb (revision 53165)
+++ Test/tests/attributes/Attributes.vb (working copy)
@@ -24,7 +24,8 @@
 End Class
 
 
-<Publication("Tata McGraw"),AuthorAttribute("Robin Cook",No:=47),Author(10)> _
+<Publication("Tata McGraw"),AuthorAttribute("Robin Cook", _
+       No:=47),Author(10)> _
 Public Class C1
        <Author("John"),Publication("Tata McGraw")> _
        Public Sub S1()

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Mono-vb mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/mono-vb

Reply via email to