View Javadoc
1   /**
2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3    */
4   package net.sourceforge.pmd.lang.ecmascript.ast;
5   
6   import net.sourceforge.pmd.lang.ast.Node;
7   
8   import org.mozilla.javascript.ast.AstNode;
9   
10  public interface EcmascriptNode<T extends AstNode> extends Node {
11  
12      /**
13       * Accept the visitor. *
14       */
15      Object jjtAccept(EcmascriptParserVisitor visitor, Object data);
16  
17      /**
18       * Accept the visitor. *
19       */
20      Object childrenAccept(EcmascriptParserVisitor visitor, Object data);
21      
22      /**
23       * Get the underlying Rhino AST node.
24       */
25      T getNode();
26      
27      /**
28       * Get the JsDoc associated with the given node.  If there is no JsDoc on
29       * this node, it may be associated with a parent node, on more representative
30       * of the entire expression containing this node.
31       * @return The JsDoc comment for the node, may be <code>null</code>.
32       */
33      String getJsDoc();
34  
35      boolean hasSideEffects();
36  }