public override void VisitExpressionParenGroup(ExpressionParenGroup node, CloningAstVisitorContext context)
 {
     context.Result = new ExpressionParenGroup()
     {
         Content = this.CloneNode(node.Content, context)
     };
 }
        public override AstNode VisitPrimary_expression([NotNull] GLSL_ES300Parser.Primary_expressionContext context)
        {
            var varId = context.variable_identifier();

            if (varId != null)
            {
                return(new ExpressionVariableIdentifier()
                {
                    Identifier = new Identifier()
                    {
                        Name = varId.Identifier().Symbol.Text
                    }
                });
            }

            var intLiteral = context.IntegerLiteral();

            if (intLiteral != null)
            {
                return(new IntegerLiteral()
                {
                    LiteralValue = intLiteral.GetText()
                });
            }

            var floatLiteral = context.FloatingLiteral();

            if (floatLiteral != null)
            {
                return(new FloatLiteral()
                {
                    LiteralValue = floatLiteral.GetText()
                });
            }

            var boolLiteral = context.BoolLiteral();

            if (boolLiteral != null)
            {
                return(new BooleanLiteral()
                {
                    LiteralValue = boolLiteral.GetText()
                });
            }

            var result = new ExpressionParenGroup();

            result.Content = (Expression)this.Visit(context.expression());
            return(result);
        }
 public virtual void VisitExpressionParenGroup(ExpressionParenGroup node, TContext context)
 {
     this.Visit(node.Content, context);
 }
 public override void VisitExpressionParenGroup(ExpressionParenGroup node, AstPrinterContext context)
 {
     context.Write("(");
     this.Visit(node.Content, context);
     context.Write(")");
 }