You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by jv...@locus.apache.org on 2000/09/21 04:36:16 UTC
cvs commit: jakarta-velocity/src/java/org/apache/velocity/processor/javacc/parser NodeUtils.java
jvanzyl 00/09/20 19:36:16
Added: src/java/org/apache/velocity/processor/javacc/parser
NodeUtils.java
Log:
- utils needed by some of the nodes. it's duplicated code right now.
all the visitors will be cleaned out shortly, and code specific
to a node type will be placed solely within the node.
Revision Changes Path
1.1 jakarta-velocity/src/java/org/apache/velocity/processor/javacc/parser/NodeUtils.java
Index: NodeUtils.java
===================================================================
package org.apache.velocity.processor.javacc.parser;
public class NodeUtils
{
public static String specialText(Token t)
{
String specialText = "";
if (t.specialToken == null || t.specialToken.image.startsWith("##"))
return specialText;
Token tmp_t = t.specialToken;
while (tmp_t.specialToken != null)
tmp_t = tmp_t.specialToken;
while (tmp_t != null)
{
specialText += tmp_t.image;
tmp_t = tmp_t.next;
}
return specialText;
}
}