Beispiel #1
0
 public void saveForStmt(string path, ForStatementNode stmt)
 {
     oilcan.setStringValue(path + ".type", "for-stmt");
     saveStatementList(path + ".decl1", stmt.decl1);
     saveExpression(path + ".expr1", stmt.expr1);
     saveExpression(path + ".expr2", stmt.expr2);
     saveExpression(path + ".expr3", stmt.expr3);
     saveStatementList(path + ".body", stmt.body);
 }
Beispiel #2
0
        public ForStatementNode loadForStmt(string path)
        {
            List <StatementNode> decl1 = loadStatementList(path + ".decl1");
            ExprNode             expr1 = loadExpression(path + ".expr1");
            ExprNode             expr2 = loadExpression(path + ".expr2");
            ExprNode             expr3 = loadExpression(path + ".expr3");
            List <StatementNode> body  = loadStatementList(path + ".body");
            ForStatementNode     snode = new ForStatementNode(decl1, expr1, expr2, expr3, body);

            return(snode);
        }