01 /**
02 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
03 */
04 package net.sourceforge.pmd.lang.ecmascript.ast;
05
06 import org.mozilla.javascript.ast.StringLiteral;
07
08 public class ASTStringLiteral extends AbstractEcmascriptNode<StringLiteral> {
09 public ASTStringLiteral(StringLiteral stringLiteral) {
10 super(stringLiteral);
11 super.setImage(stringLiteral.getValue());
12 }
13
14 /**
15 * Accept the visitor.
16 */
17 public Object jjtAccept(EcmascriptParserVisitor visitor, Object data) {
18 return visitor.visit(this, data);
19 }
20
21 public char getQuoteCharacter() {
22 return node.getQuoteCharacter();
23 }
24
25 public boolean isSingleQuoted() {
26 return '\'' == getQuoteCharacter();
27 }
28
29 public boolean isDoubleQuoted() {
30 return '"' == getQuoteCharacter();
31 }
32 }
|