Skip to content

Commit 86e2660

Browse files
committed
Give precedence to type hinted identifiers in grammar. Closes #2618
1 parent 59720c1 commit 86e2660

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

Rubberduck.Parsing/Grammar/VBALexer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// </auto-generated>
99
//------------------------------------------------------------------------------
1010

11-
// Generated from C:\Users\hosch\Documents\Visual Studio 2015\Projects\Rubberduck\Rubberduck.Parsing\Grammar\VBALexer.g4 by ANTLR 4.3
11+
// Generated from C:\Dev\Rubberduck\Rubberduck.Parsing\Grammar\VBALexer.g4 by ANTLR 4.3
1212

1313
// Unreachable code detected
1414
#pragma warning disable 0162

Rubberduck.Parsing/Grammar/VBAParser.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13450,14 +13450,14 @@ public IdentifierContext identifier() {
1345013450
case 1:
1345113451
EnterOuterAlt(_localctx, 1);
1345213452
{
13453-
State = 2184; untypedIdentifier();
13453+
State = 2184; typedIdentifier();
1345413454
}
1345513455
break;
1345613456

1345713457
case 2:
1345813458
EnterOuterAlt(_localctx, 2);
1345913459
{
13460-
State = 2185; typedIdentifier();
13460+
State = 2185; untypedIdentifier();
1346113461
}
1346213462
break;
1346313463
}
@@ -20544,7 +20544,7 @@ private bool upperCaseA_sempred(UpperCaseAContext _localctx, int predIndex) {
2054420544
"\x2\x2\x2\x883\x884\x5\x172\xBA\x2\x884\x14B\x3\x2\x2\x2\x885\x889\x5"+
2054520545
"\x14E\xA8\x2\x886\x889\x5\x19C\xCF\x2\x887\x889\x5\x19A\xCE\x2\x888\x885"+
2054620546
"\x3\x2\x2\x2\x888\x886\x3\x2\x2\x2\x888\x887\x3\x2\x2\x2\x889\x14D\x3"+
20547-
"\x2\x2\x2\x88A\x88D\x5\x150\xA9\x2\x88B\x88D\x5\x152\xAA\x2\x88C\x88A"+
20547+
"\x2\x2\x2\x88A\x88D\x5\x152\xAA\x2\x88B\x88D\x5\x150\xA9\x2\x88C\x88A"+
2054820548
"\x3\x2\x2\x2\x88C\x88B\x3\x2\x2\x2\x88D\x14F\x3\x2\x2\x2\x88E\x88F\x5"+
2054920549
"\x154\xAB\x2\x88F\x151\x3\x2\x2\x2\x890\x891\x5\x154\xAB\x2\x891\x892"+
2055020550
"\x5\x16E\xB8\x2\x892\x153\x3\x2\x2\x2\x893\x898\a\xED\x2\x2\x894\x898"+

Rubberduck.Parsing/Grammar/VBAParser.g4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ subscripts : subscript (whiteSpace? COMMA whiteSpace? subscript)*;
522522
subscript : (expression whiteSpace TO whiteSpace)? expression;
523523

524524
unrestrictedIdentifier : identifier | statementKeyword | markerKeyword;
525-
identifier : untypedIdentifier | typedIdentifier;
525+
identifier : typedIdentifier | untypedIdentifier;
526526
untypedIdentifier : identifierValue;
527527
typedIdentifier : identifierValue typeHint;
528528
identifierValue : IDENTIFIER | keyword | foreignName | BF;

Rubberduck.Parsing/Rubberduck.Parsing.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
<SignAssembly>false</SignAssembly>
4343
</PropertyGroup>
4444
<ItemGroup>
45-
<Reference Include="Antlr4.Runtime.net45">
45+
<Reference Include="Antlr4.Runtime.net45, Version=4.3.0.0, Culture=neutral, PublicKeyToken=eb42632606e9261f, processorArchitecture=MSIL">
46+
<SpecificVersion>False</SpecificVersion>
4647
<HintPath>..\packages\Antlr4.Runtime.4.3.0\lib\net45\Antlr4.Runtime.net45.dll</HintPath>
4748
</Reference>
4849
<Reference Include="Microsoft.Build.Tasks.v4.0" />

0 commit comments

Comments
 (0)