//Pop index operator operand public override void ExitIndexOp([NotNull] CmanParser.IndexOpContext context) { ASTIndexOpNode indexOp = (ASTIndexOpNode)_nodes.ElementAt(2); indexOp.Index = (IASTExprNode)_nodes.Pop(); indexOp.Expression = (IASTExprNode)_nodes.Pop(); }
//Push index op to stack public override void EnterIndexOp([NotNull] CmanParser.IndexOpContext context) { _nodes.Push(new ASTIndexOpNode(context, _nodes.Peek())); }
public ASTIndexOpNode(CmanParser.IndexOpContext context, ASTNode parent) : base(parent) { SetLocation(context); }