001    /* Generated By:JJTree: Do not edit this line. ASTarray.java */
002    
003    package net.sourceforge.javajson.parser;
004    
005    import net.sourceforge.javajson.JsonArray;
006    
007    public class ASTarray extends SimpleNode {
008            JsonArray array = new JsonArray();
009    
010            public ASTarray(int id) {
011                    super(id);
012            }
013    
014            public ASTarray(JsonParser p, int id) {
015                    super(p, id);
016            }
017    
018            @Override
019            protected void interpret() {
020                    if (children != null) {
021                            for (int i = 0; i < children.length; i++) {
022                                    if (children[i] instanceof SimpleNode) {
023                                            SimpleNode node = (SimpleNode) children[i];
024                                            node.interpret();
025                                    }
026                            }
027                    }
028    
029                    ((SimpleNode) parent).push(array);
030            }
031    
032            @Override
033            protected void push(Object o) {
034                    array.add(o);
035            }
036    }