1
0
mirror of https://github.com/twiglet/cs2j.git synced 2025-01-18 13:15:17 +01:00

fixes after stress test against libomv

This commit is contained in:
Kevin Glynn 2011-05-20 15:34:16 +02:00
parent 63cbb54855
commit c457c5c6f8
3 changed files with 10 additions and 11 deletions

View File

@ -717,9 +717,12 @@ default_value_expression:
anonymous_method_expression: anonymous_method_expression:
'delegate'^ explicit_anonymous_function_signature? block; 'delegate'^ explicit_anonymous_function_signature? block;
explicit_anonymous_function_signature: explicit_anonymous_function_signature:
'(' explicit_anonymous_function_parameter_list? ')' -> ^(PARAMS explicit_anonymous_function_parameter_list?); '(' explicit_anonymous_function_parameter_list? ')'
-> {$explicit_anonymous_function_parameter_list.tree != null}? ^(PARAMS explicit_anonymous_function_parameter_list?)
->
;
explicit_anonymous_function_parameter_list: explicit_anonymous_function_parameter_list:
explicit_anonymous_function_parameter (',' explicit_anonymous_function_parameter)* ; explicit_anonymous_function_parameter (','! explicit_anonymous_function_parameter)* ;
explicit_anonymous_function_parameter: explicit_anonymous_function_parameter:
anonymous_function_parameter_modifier? type identifier; anonymous_function_parameter_modifier? type identifier;
anonymous_function_parameter_modifier: anonymous_function_parameter_modifier:
@ -978,7 +981,7 @@ anonymous_function_signature:
| implicit_anonymous_function_parameter_list -> ^(PARAMS_TYPELESS implicit_anonymous_function_parameter_list) | implicit_anonymous_function_parameter_list -> ^(PARAMS_TYPELESS implicit_anonymous_function_parameter_list)
; ;
implicit_anonymous_function_parameter_list: implicit_anonymous_function_parameter_list:
implicit_anonymous_function_parameter (',' implicit_anonymous_function_parameter)* ; implicit_anonymous_function_parameter (','! implicit_anonymous_function_parameter)* ;
implicit_anonymous_function_parameter: implicit_anonymous_function_parameter:
identifier; identifier;
anonymous_function_body: anonymous_function_body:

View File

@ -787,7 +787,7 @@ non_assignment_expression returns [int precedence]
$precedence = int.MaxValue; $precedence = int.MaxValue;
}: }:
//'non ASSIGNment' //'non ASSIGNment'
(anonymous_function_signature '=>') => lambda_expression { $precedence = precedence[LAMBDA]; } -> { $lambda_expression.st; } (anonymous_function_signature? '=>') => lambda_expression { $precedence = precedence[LAMBDA]; } -> { $lambda_expression.st; }
| (query_expression) => query_expression | (query_expression) => query_expression
| ^(cop=COND_EXPR ce1=non_assignment_expression ce2=expression ce3=expression) { $precedence = precedence[$cop.token.Type]; } | ^(cop=COND_EXPR ce1=non_assignment_expression ce2=expression ce3=expression) { $precedence = precedence[$cop.token.Type]; }
-> cond( condexp = { $ce1.st }, thenexp = { $ce2.st }, elseexp = { $ce3.st }, -> cond( condexp = { $ce1.st }, thenexp = { $ce2.st }, elseexp = { $ce3.st },
@ -1009,9 +1009,7 @@ member_name
/////////////////////////////////////////////////////// ///////////////////////////////////////////////////////
event_declaration: event_declaration:
'event' type type member_name '{' event_accessor_declarations '}'
((member_name '{') => member_name '{' event_accessor_declarations '}'
| variable_declarators ';') // typename=foo;
; ;
event_modifiers: event_modifiers:
modifier+ ; modifier+ ;

View File

@ -699,7 +699,7 @@ scope MkNonGeneric {
if (delg.Invoke.Params.Count > 0) { if (delg.Invoke.Params.Count > 0) {
adaptor.AddChild(call, mkParams(delg.Invoke.Params, false, tok)); adaptor.AddChild(call, mkParams(delg.Invoke.Params, false, tok));
} }
if (returnType.IsA(voidType, AppEnv)) { if (returnType.IsA(VoidType, AppEnv)) {
adaptor.AddChild(ret, call); adaptor.AddChild(ret, call);
adaptor.AddChild(method, ret); adaptor.AddChild(method, ret);
} }
@ -2369,9 +2369,7 @@ member_name
/////////////////////////////////////////////////////// ///////////////////////////////////////////////////////
event_declaration: event_declaration:
'event' type type member_name '{' event_accessor_declarations '}'
((member_name '{') => member_name '{' event_accessor_declarations '}'
| variable_declarators[$type.tree, $type.dotNetType] ';') // typename=foo;
; ;
event_modifiers: event_modifiers:
modifier+ ; modifier+ ;