Esempio n. 1
0
        private CompoundStatementNode Visit(CompoundStatementNode node)
        {
            dynamic props = new ExpandoObject();

            properties.Add(node, props);
            props.code = properties[node.StatementsNode].code;
            return(node);
        }
        public override StatementNode VisitCompoundStatement([NotNull] CoronaParser.CompoundStatementContext context)
        {
            CompoundStatementNode node = new CompoundStatementNode(new List <StatementNode>());

            // Visit each statement in the compound statement
            foreach (CoronaParser.StatementContext statement in context.statement())
            {
                node.Statements.Add(Visit(statement));
            }

            return(node);
        }
        public string VisitCompoundStatement(CompoundStatementNode compoundStatement)
        {
            var str = $"{AddSpaces(-3)}begin\r\n";

            foreach (var compoundStatementNode in compoundStatement.Nodes)
            {
                str += VisitNode(compoundStatementNode);
            }

            str += AddSpaces(-3) + "end; {END OF " + CurrentScope.ScopeName + "}\r\n";
            return(str);
        }
        public void Visit(CompoundStatementNode node)
        {
            Stbl.st.OpenScope();

            // Evaluate each statement inside the compoundStatement
            foreach (StatementNode sNode in node.Statements)
            {
                if (!sender.ReturnStatementHasBeenHit)
                {
                    Visit(sNode);
                }
                else
                {
                    break;
                }
            }

            Stbl.st.CloseScope();
        }
Esempio n. 5
0
 public virtual T VisitCompoundStatement(CompoundStatementNode statement)
 {
     throw new NotImplementedException();
 }
Esempio n. 6
0
 private CompoundStatementNode Visit(CompoundStatementNode node)
 {
     Visit(node.StatementsNode);
     return(node);
 }
Esempio n. 7
0
 public override string VisitCompoundStatement(CompoundStatementNode compoundStatement)
 {
     return(VisitNodes(compoundStatement.Nodes, true));
     // return $"{AddSpaces()}public static {type} {name}()\r\n" + AddSpaces() + "{\r\n" + VisitNodes(compoundStatement.Nodes) + AddSpaces() + "}\r\n";
 }
Esempio n. 8
0
 public string VisitCompoundStatement(CompoundStatementNode statement)
 {
     throw new NotImplementedException();
 }
Esempio n. 9
0
 public AddressNode VisitCompoundStatement(CompoundStatementNode statement)
 {
     throw new System.NotImplementedException();
 }