PageRenderTime 41ms CodeModel.GetById 34ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 0ms

/bundles/plugins-trunk/XML/sidekick/ecmascript/parser/ASTExpressionStatement.java

#
Java | 53 lines | 38 code | 13 blank | 2 comment | 6 complexity | cc698f3a0b0c9a5c8a492de3670c0131 MD5 | raw file
 1/* Generated By:JJTree: Do not edit this line. ASTExpressionStatement.java */
 2
 3
 4
 5package sidekick.ecmascript.parser;
 6
 7import java.util.*;
 8
 9
10public class ASTExpressionStatement extends SimpleNode {
11
12    public ASTExpressionStatement( int id ) {
13        super( id );
14    }
15
16    public ASTExpressionStatement( EcmaScript p, int id ) {
17        super( p, id );
18    }
19
20    /** Accept the visitor. **/
21    public Object jjtAccept( EcmaScriptVisitor visitor, Object data ) {
22        return visitor.visit( this, data );
23    }
24
25    public List getChildren() {
26        if ( children != null ) {
27            List kids = Arrays.asList(children);
28            return kids.subList(0, kids.size());
29        }
30        else {
31            return null;
32        }
33    }
34
35    public String toString() {
36        boolean b = System.getProperty( "sidekick.ecmascript.general.allNodes", "false" ).startsWith("t");
37        if (b) {
38            return super.toString();
39        }
40
41        try {
42            if ( jjtGetChild( 0 ).jjtGetChild( 0 ) instanceof ASTCompositeReference ) {
43                String name = ( ( ASTCompositeReference ) jjtGetChild( 0 ).jjtGetChild( 0 ) ).getCompositeName();
44                return name == null ? super.toString() : name;
45            }
46            return super.toString();
47        }
48        catch ( Exception e ) {
49            return "";
50        }
51    }
52
53}