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 org.mozilla.javascript.ast.NumberLiteral;
7   
8   // TODO The Rhino node does not tell us whether this was specified via decimal, octal or hexidecimal.
9   public class ASTNumberLiteral extends AbstractEcmascriptNode<NumberLiteral> {
10      public ASTNumberLiteral(NumberLiteral numberLiteral) {
11  	super(numberLiteral);
12  	super.setImage(numberLiteral.getValue());
13      }
14  
15      /**
16       * Accept the visitor.
17       */
18      public Object jjtAccept(EcmascriptParserVisitor visitor, Object data) {
19  	return visitor.visit(this, data);
20      }
21  
22      public String getNormalizedImage() {
23  	// TODO Implement
24  	return super.getImage();
25      }
26  
27      public double getNumber() {
28  	return node.getNumber();
29      }
30  }