Skip to content

Commit

Permalink
Remove evaluation by blocks
Browse files Browse the repository at this point in the history
Introduces AssignExpressionNode and rewrites evaluation of declarations
and references. Closes #4913. Added handling of Static variables.
  • Loading branch information
BZngr committed Jul 11, 2020
1 parent dc812cf commit 7a10c47
Show file tree
Hide file tree
Showing 4 changed files with 231 additions and 262 deletions.
@@ -0,0 +1,9 @@
using Antlr4.Runtime.Tree;

namespace Rubberduck.Inspections.CodePathAnalysis.Nodes
{
public class AssignmentExpressionNode : NodeBase
{
public AssignmentExpressionNode(IParseTree tree) : base(tree) { }
}
}
4 changes: 4 additions & 0 deletions Rubberduck.CodeAnalysis/CodePathAnalysis/Walker.cs
Expand Up @@ -33,6 +33,10 @@ public INode GenerateTree(IParseTree tree, Declaration declaration)
case VBAParser.BlockContext _:
node = new BlockNode(tree);
break;
case VBAParser.LetStmtContext _:
case VBAParser.SetStmtContext _:
node = new AssignmentExpressionNode(tree);
break;
}

if (declaration.Context == tree)
Expand Down

0 comments on commit 7a10c47

Please sign in to comment.