예제 #1
0
        public override ASTNode VisitAssignment([NotNull] p4Parser.AssignmentContext context)
        {
            IdAstNode id = new IdAstNode(context.Id().Symbol, SALTypeEnum.undefined);

            Antlr4.Runtime.IToken symbol = Visit(context.assnOp()).Token;
            ASTNode expr = Visit(context.expr());

            return(new AssignAstNode(id, symbol, expr));
        }