diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs index 91b0bc3d4f..2b0c92d516 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs @@ -4080,12 +4080,12 @@ out val); lexer.NextToken(); #line 1748 "VBNET.ATG" - retExpr = new BaseReferenceExpression(); + retExpr = new BaseReferenceExpression() { StartLocation = t.Location, EndLocation = t.EndLocation }; } else if (la.kind == 159) { lexer.NextToken(); #line 1749 "VBNET.ATG" - retExpr = new ClassReferenceExpression(); + retExpr = new ClassReferenceExpression() { StartLocation = t.Location, EndLocation = t.EndLocation }; } else SynErr(281); Expect(26); IdentifierOrKeyword( diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG index 4369e0ce25..d3e23c65aa 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG @@ -1745,8 +1745,8 @@ SimpleNonInvocationExpression (. pexpr = new TypeReferenceExpression(new TypeReference(val, true)); .) | "Me" (. pexpr = new ThisReferenceExpression(); .) | (. Expression retExpr = null; .) - ( "MyBase" (. retExpr = new BaseReferenceExpression(); .) - | "MyClass" (. retExpr = new ClassReferenceExpression(); .) + ( "MyBase" (. retExpr = new BaseReferenceExpression() { StartLocation = t.Location, EndLocation = t.EndLocation }; .) + | "MyClass" (. retExpr = new ClassReferenceExpression() { StartLocation = t.Location, EndLocation = t.EndLocation }; .) ) "." IdentifierOrKeyword (. pexpr = new MemberReferenceExpression(retExpr, name); .) | "Global" "."