Siegfried Pammer 16 years ago
parent
commit
a93d3be956
  1. 2352
      src/Libraries/NRefactory/Project/Src/Parser/CSharp/Parser.cs
  2. 8
      src/Libraries/NRefactory/Project/Src/Parser/CSharp/cs.ATG

2352
src/Libraries/NRefactory/Project/Src/Parser/CSharp/Parser.cs

File diff suppressed because it is too large Load Diff

8
src/Libraries/NRefactory/Project/Src/Parser/CSharp/cs.ATG

@ -906,8 +906,8 @@ StructMemberDecl<ModifierList m, List<AttributeSection> attributes>
if (m.isNone) Error("at least one modifier must be set"); if (m.isNone) Error("at least one modifier must be set");
.) .)
"operator" OverloadableOperator<out op> (. TypeReference firstType, secondType = null; string secondName = null; .) "operator" OverloadableOperator<out op> (. TypeReference firstType, secondType = null; string secondName = null; .)
"(" Type<out firstType> Identifier (. string firstName = t.val; .) "(" (. Location firstStart = la.Location, secondStart = Location.Empty, secondEnd = Location.Empty; .) Type<out firstType> Identifier (. string firstName = t.val; Location firstEnd = t.EndLocation; .)
( "," Type<out secondType> Identifier (. secondName = t.val; .) /* (. if (Tokens.OverloadableUnaryOp[op.kind] && !Tokens.OverloadableBinaryOp[op.kind]) ( "," (. secondStart = la.Location; .) Type<out secondType> Identifier (. secondName = t.val; secondEnd = t.EndLocation; .) /* (. if (Tokens.OverloadableUnaryOp[op.kind] && !Tokens.OverloadableBinaryOp[op.kind])
Error("too many operands for unary operator"); Error("too many operands for unary operator");
.)*/ .)*/
| /* empty */ /*(. if (Tokens.OverloadableBinaryOp[op.kind]){ | /* empty */ /*(. if (Tokens.OverloadableBinaryOp[op.kind]){
@ -932,9 +932,9 @@ StructMemberDecl<ModifierList m, List<AttributeSection> attributes>
StartLocation = m.GetDeclarationLocation(startPos), StartLocation = m.GetDeclarationLocation(startPos),
EndLocation = endPos EndLocation = endPos
}; };
SafeAdd(operatorDeclaration, operatorDeclaration.Parameters, new ParameterDeclarationExpression(firstType, firstName)); SafeAdd(operatorDeclaration, operatorDeclaration.Parameters, new ParameterDeclarationExpression(firstType, firstName) { StartLocation = firstStart, EndLocation = firstEnd });
if (secondType != null) { if (secondType != null) {
SafeAdd(operatorDeclaration, operatorDeclaration.Parameters, new ParameterDeclarationExpression(secondType, secondName)); SafeAdd(operatorDeclaration, operatorDeclaration.Parameters, new ParameterDeclarationExpression(secondType, secondName) { StartLocation = secondStart, EndLocation = secondEnd });
} }
AddChild(operatorDeclaration); AddChild(operatorDeclaration);
.) .)

Loading…
Cancel
Save