public override void EnterLitIdent([NotNull] LitIdentContext context) { VariableNameExpression expression = new VariableNameExpression(Result, context); expression.Name = context.GetText(); expression.ParentAccessor = null; Result.Insert(expression); }
public override void EnterFieldAccessor([NotNull] FieldAccessorContext context) { VariableNameExpression expr = new VariableNameExpression(Result, context); expr.Name = context.IDENTIFIER().GetText(); ExpressionListener expressionListener = new ExpressionListener(expr); context.expression().EnterRule(expressionListener); expr.ParentAccessor = expressionListener.Result.Get <AccessorExpression>(0); this.Result.Insert(expr); }