/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. package sidekick.ecmascript.parser;
  3. import java.util.*;
  4. public class ASTExpressionStatement extends SimpleNode {
  5. public ASTExpressionStatement( int id ) {
  6. super( id );
  7. }
  8. public ASTExpressionStatement( EcmaScript p, int id ) {
  9. super( p, id );
  10. }
  11. /** Accept the visitor. **/
  12. public Object jjtAccept( EcmaScriptVisitor visitor, Object data ) {
  13. return visitor.visit( this, data );
  14. }
  15. public List getChildren() {
  16. if ( children != null ) {
  17. List kids = Arrays.asList(children);
  18. return kids.subList(0, kids.size());
  19. }
  20. else {
  21. return null;
  22. }
  23. }
  24. public String toString() {
  25. boolean b = System.getProperty( "sidekick.ecmascript.general.allNodes", "false" ).startsWith("t");
  26. if (b) {
  27. return super.toString();
  28. }
  29. try {
  30. if ( jjtGetChild( 0 ).jjtGetChild( 0 ) instanceof ASTCompositeReference ) {
  31. String name = ( ( ASTCompositeReference ) jjtGetChild( 0 ).jjtGetChild( 0 ) ).getCompositeName();
  32. return name == null ? super.toString() : name;
  33. }
  34. return super.toString();
  35. }
  36. catch ( Exception e ) {
  37. return "";
  38. }
  39. }
  40. }