public void visitDefault(GroovySourceAST t,int visit) { if (visit == OPENING_VISIT) { // only want to do this once per node... t.setType(typeMapping[t.getType()]); // ---- // need to remove double quotes in string literals // as groovy AST doesn't expect to have them if (t.getType() == GroovyTokenTypes.STRING_LITERAL) { String text = t.getText(); if (isSingleQuoted(text) || isDoubleQuoted(text)) { t.setText(text.substring(1, text.length() - 1)); // chop off the single quotes at start and end } } } }
public void visitDefault(GroovySourceAST t,int visit) { if (visit == OPENING_VISIT) { // only want to do this once per node... t.setType(typeMapping[t.getType()]); // ---- // need to remove double quotes in string literals // as groovy AST doesn't expect to have them if (t.getType() == GroovyTokenTypes.STRING_LITERAL) { String text = t.getText(); if (isSingleQuoted(text)) { t.setText(text.substring(1, text.length() - 1)); // chop off the single quotes at start and end } else if (isDoubleQuoted(text)) { t.setText(text.substring(1, text.length() - 1)); // chop off the double quotes at start and end } } } }
public void visitDefault(GroovySourceAST t,int visit) { if (visit == OPENING_VISIT) { // only want to do this once per node... t.setType(typeMapping[t.getType()]); // ---- // need to remove double quotes in string literals // as groovy AST doesn't expect to have them if (t.getType() == GroovyTokenTypes.STRING_LITERAL) { String text = t.getText(); if (isSingleQuoted(text)) { t.setText(text.substring(1, text.length() - 1)); // chop off the single quotes at start and end } else if (isDoubleQuoted(text)) { t.setText(text.substring(1, text.length() - 1)); // chop off the double quotes at start and end } } } }
public void visitDefault(GroovySourceAST t,int visit) { if (visit == OPENING_VISIT) { // only want to do this once per node... t.setType(typeMapping[t.getType()]); // ---- // need to remove double quotes in string literals // as groovy AST doesn't expect to have them if (t.getType() == GroovyTokenTypes.STRING_LITERAL) { String text = t.getText(); if (isSingleQuoted(text)) { t.setText(text.substring(1, text.length() - 1)); // chop off the single quotes at start and end } else if (isDoubleQuoted(text)) { t.setText(text.substring(1, text.length() - 1)); // chop off the double quotes at start and end } } } }
public void visitDefault(GroovySourceAST t,int visit) { if (visit == OPENING_VISIT) { // only want to do this once per node... t.setType(typeMapping[t.getType()]); // ---- // need to remove double quotes in string literals // as groovy AST doesn't expect to have them if (t.getType() == GroovyTokenTypes.STRING_LITERAL) { String text = t.getText(); if (isSingleQuoted(text)) { t.setText(text.substring(1, text.length() - 1)); // chop off the single quotes at start and end } else if (isDoubleQuoted(text)) { t.setText(text.substring(1, text.length() - 1)); // chop off the double quotes at start and end } } } }