예제 #1
0
        public override CSharpSyntaxNode VisitCombinedExpressions([NotNull] DreamGrammarParser.CombinedExpressionsContext context)
        {
            var binaryExpression = new GenerateBinaryExpression();

            binaryExpression.Walk(context)
            .PostWalk()
            .PrintPostFix()
            .Eval();

            return(binaryExpression.GetLocalDeclarationStatementSyntax());
        }
예제 #2
0
        public override CSharpSyntaxNode VisitVariableDeclarationExpression([NotNull] DreamGrammarParser.VariableDeclarationExpressionContext context)
        {
            string variableName = context.variableDeclarationAssignment().variable().GetText();

            var binaryExpression = new GenerateBinaryExpression();

            binaryExpression.Walk(context)
            .PostWalk()
            .PrintPostFix()
            .Eval();

            return(binaryExpression.GetLocalDeclarationStatementSyntax());
        }