Skip to content

Commit 4f724da

Browse files
committed
Revert "fixed parser issue with iCS_B_MemberCall precedence"
This reverts commit 36c9a64.
1 parent 436a197 commit 4f724da

File tree

9 files changed

+1295
-1303
lines changed

9 files changed

+1295
-1303
lines changed

Rubberduck.Parsing/Grammar/VBAParser.cs

Lines changed: 1284 additions & 1292 deletions
Large diffs are not rendered by default.

Rubberduck.Parsing/Grammar/VBAParser.g4

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -467,14 +467,14 @@ eCS_ProcedureCall : CALL whiteSpace ambiguousIdentifier typeHint? (whiteSpace? L
467467
eCS_MemberProcedureCall : CALL whiteSpace implicitCallStmt_InStmt? DOT ambiguousIdentifier typeHint? (whiteSpace? LPAREN whiteSpace? argsCall whiteSpace? RPAREN)? (whiteSpace? LPAREN subscripts RPAREN)*;
468468

469469
implicitCallStmt_InBlock :
470-
iCS_B_ProcedureCall
471-
| iCS_B_MemberProcedureCall
470+
iCS_B_MemberProcedureCall
471+
| iCS_B_ProcedureCall
472472
;
473473

474-
iCS_B_ProcedureCall : certainIdentifier (whiteSpace argsCall)? (whiteSpace? LPAREN subscripts RPAREN)*;
475-
476474
iCS_B_MemberProcedureCall : implicitCallStmt_InStmt? whiteSpace? DOT whiteSpace? ambiguousIdentifier typeHint? (whiteSpace argsCall)? (whiteSpace? dictionaryCallStmt)? (whiteSpace? LPAREN subscripts RPAREN)*;
477475

476+
iCS_B_ProcedureCall : certainIdentifier (whiteSpace argsCall)? (whiteSpace? LPAREN subscripts RPAREN)*;
477+
478478
implicitCallStmt_InStmt :
479479
iCS_S_MembersCall
480480
| iCS_S_VariableOrProcedureCall

Rubberduck.Parsing/Grammar/VBAParserBaseListener.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:\Dev\Rubberduck\Rubberduck\Rubberduck.Parsing\Grammar\VBAParser.g4 by ANTLR 4.3
11+
// Generated from C:\Users\Splinter\Documents\Visual Studio 2015\Projects\TestProj\TestProj\Grammar\VBAParser.g4 by ANTLR 4.3
1212

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

Rubberduck.Parsing/Grammar/VBAParserBaseVisitor.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:\Dev\Rubberduck\Rubberduck\Rubberduck.Parsing\Grammar\VBAParser.g4 by ANTLR 4.3
11+
// Generated from C:\Users\Splinter\Documents\Visual Studio 2015\Projects\TestProj\TestProj\Grammar\VBAParser.g4 by ANTLR 4.3
1212

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

Rubberduck.Parsing/Grammar/VBAParserListener.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:\Dev\Rubberduck\Rubberduck\Rubberduck.Parsing\Grammar\VBAParser.g4 by ANTLR 4.3
11+
// Generated from C:\Users\Splinter\Documents\Visual Studio 2015\Projects\TestProj\TestProj\Grammar\VBAParser.g4 by ANTLR 4.3
1212

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

Rubberduck.Parsing/Grammar/VBAParserVisitor.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:\Dev\Rubberduck\Rubberduck\Rubberduck.Parsing\Grammar\VBAParser.g4 by ANTLR 4.3
11+
// Generated from C:\Users\Splinter\Documents\Visual Studio 2015\Projects\TestProj\TestProj\Grammar\VBAParser.g4 by ANTLR 4.3
1212

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

Rubberduck.Parsing/Symbols/IdentifierReferenceResolver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ private Declaration ResolveInternal(VBAParser.ICS_S_MembersCallContext context,
595595
}
596596

597597
Declaration parent;
598-
if (_withBlockQualifiers.Any() && (context.iCS_S_VariableOrProcedureCall() == null && context.iCS_S_ProcedureOrArrayCall() == null))
598+
if (_withBlockQualifiers.Any())
599599
{
600600
parent = _withBlockQualifiers.Peek();
601601
if (parent == null)

Rubberduck.Parsing/VBA/RubberduckParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ private void ResolveDeclarations(VBComponent component, IParseTree tree)
318318
ParseTreeWalker.Default.Walk(declarationsListener, tree);
319319
} catch (Exception exception)
320320
{
321-
Debug.Print("Exception thrown finding declarations for '{0}' (thread {2}): {1}", component.Name, exception, Thread.CurrentThread.ManagedThreadId);
321+
Debug.Print("Exception thrown resolving '{0}' (thread {2}): {1}", component.Name, exception, Thread.CurrentThread.ManagedThreadId);
322322
_state.SetModuleState(component, ParserState.ResolverError);
323323
}
324324

Rubberduck.Parsing/VBA/RubberduckParserState.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ private ParserState EvaluateParserState()
166166
}
167167

168168
// "working" states are toggled when *any* module has them.
169-
var result = moduleStates.Except(new[]{ParserState.Ready}).Min();
169+
var result = moduleStates.Min();
170170
if (moduleStates.Any(ms => ms == ParserState.LoadingReference))
171171
{
172172
result = ParserState.LoadingReference;

0 commit comments

Comments
 (0)