Skip to content

Commit

Permalink
Merge pull request #6 from djluck/visitor-bug-fix
Browse files Browse the repository at this point in the history
Fixing bug that meant VectorSelector wasn't returned by the depth-fir…
  • Loading branch information
djluck authored Apr 29, 2022
2 parents 507ce51 + 54e069b commit 7248e7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/PromQL.Parser/DepthFirstExpressionVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void IVisitor.Visit(UnaryExpr unary)
void IVisitor.Visit(MatrixSelector ms)
{
_expressions.Add(ms);
// No need to visit vector selector, it's accessible from matrix selector
ms.Vector.Accept(this);
}

void IVisitor.Visit(OffsetExpr offset)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public void Visit_Complex_Expression()
typeof(FunctionCall),
typeof(OffsetExpr),
typeof(MatrixSelector),
typeof(VectorSelector),
typeof(UnaryExpr),
typeof(ParenExpression),
typeof(SubqueryExpr),
Expand Down

0 comments on commit 7248e7d

Please sign in to comment.