* mb-parser.jay : First try at SyncLock Statement #53230
svn path=/trunk/mcs/; revision=31471
+2004/07/26 Rafael Teixeira <rafaelteixeirabr@hotmail.com>\r
+ * mb-parser.jay : First try at SyncLock Statement #53230
+
2004-07-22 Anirban Bhattacharjee <banirban@novell.com>
* argument.cs:
* expression.cs:
| selection_statement
| iteration_statement
| try_statement
+ | synclock_statement
| jump_statement
| array_handling_statement
;
}
;
-
+synclock_statement
+ : SYNCLOCK expression end_of_stmt
+ {
+ start_block();
+ }
+ opt_statement_list
+ END SYNCLOCK
+ {
+ $$ = new Lock ((Expression) $2, (Statement) (Block) end_block(), lexer.Location);
+ }
+ ;
try_statement
: try_catch
Dim someOtherText as string = "Blah! Some Other Text"
' Const sometext = "Yeah! Some Text" ' FIXME: raises InvalidCastException in yyParse
' Const someOtherText as string = "Blah! Some Other Text" ' FIXME: raises InvalidCastException in yyParse
- Text = "This is a test!"
- Console.WriteLine("Sub:OK! - """ & Text & """ " & someText & " " & someOtherText)
+ SyncLock Text
+ Text = "This is a test!"
+ Console.WriteLine("Sub:OK! - """ & Text & """ " & someText & " " & someOtherText)
+ End SyncLock
#If CAUSEERRORS
Yield 1
Yield Stop