Skip to content

Commit 7a10c47

Browse files
committed
Remove evaluation by blocks
Introduces AssignExpressionNode and rewrites evaluation of declarations and references. Closes #4913. Added handling of Static variables.
1 parent dc812cf commit 7a10c47

File tree

4 files changed

+231
-262
lines changed

4 files changed

+231
-262
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
using Antlr4.Runtime.Tree;
2+
3+
namespace Rubberduck.Inspections.CodePathAnalysis.Nodes
4+
{
5+
public class AssignmentExpressionNode : NodeBase
6+
{
7+
public AssignmentExpressionNode(IParseTree tree) : base(tree) { }
8+
}
9+
}

Rubberduck.CodeAnalysis/CodePathAnalysis/Walker.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ public INode GenerateTree(IParseTree tree, Declaration declaration)
3333
case VBAParser.BlockContext _:
3434
node = new BlockNode(tree);
3535
break;
36+
case VBAParser.LetStmtContext _:
37+
case VBAParser.SetStmtContext _:
38+
node = new AssignmentExpressionNode(tree);
39+
break;
3640
}
3741

3842
if (declaration.Context == tree)

0 commit comments

Comments
 (0)