Package org.apache.velocity.runtime.parser

Examples of org.apache.velocity.runtime.parser.Token


    }

    public Object init( InternalContextAdapter context, Object data)
        throws Exception
    {
        Token t = getFirstToken();

        String text = NodeUtils.tokenLiteral( t );
       
        ctext = text.toCharArray();
View Full Code Here


    // All additional methods

    public String literal()
    {
        Token t = first;
        StringBuffer sb = new StringBuffer(t.image);
       
        while (t != last)
        {
            t = t.next;
View Full Code Here

      */
    private Object showNode(Node node, Object data)
    {
        String tokens = "";
        String special = "";
        Token t;
       
        if (showTokens)
        {
            t = node.getFirstToken();
           
View Full Code Here

    // All additional methods

    public String literal()
    {
        Token t = first;
        StringBuffer sb = new StringBuffer(t.image);
       
        while (t != last)
        {
            t = t.next;
View Full Code Here

    }
   
    public void jjtOpen()
    {
      super.jjtOpen();
      Token t = first;

        /*
         *  the stringlit is set at template parse time, so we can
         *  do this here for now.  if things change and we can somehow
         * create stringlits at runtime, this must
View Full Code Here

        /*
         *  this assumes that we are passed in the root
         *  node of the code block
         */
 
        Token t = rootNode.getFirstToken();
        Token tLast = rootNode.getLastToken();

        /*
         *  now, run down the part of the tree bounded by
         *  our first and last tokens
         */
 
View Full Code Here

        /*
         *  eat the args
         */
        int i = 0;
        Token t = null;
        Token tLast = null;
   
        while( i <  numArgs )
        {
            args[i] = "";
            /*
 
View Full Code Here

       
        /**
         * Only check for strictRef setting if this really looks like a macro,
         * so strict mode doesn't balk at things like #E0E0E0 in a template.
         */
        Token t = node.getLastToken();

    DEBUG.P("t.image="+t.image);
    DEBUG.P("t.image.charAt(0)="+t.image.charAt(0));

        if (t.image.charAt(0) == ')')
View Full Code Here

    private String getLiteral()
    {
        if (literal == null)
        {
            StrBuilder buffer = new StrBuilder();
            Token t = node.getFirstToken();

            while (t != null && t != node.getLastToken())
            {
                buffer.append(t.image);
                t = t.next;
View Full Code Here

        if (first == last)
        {
            return NodeUtils.tokenLiteral(first);
        }

        Token t = first;
        StrBuilder sb = new StrBuilder(NodeUtils.tokenLiteral(t));
        while (t != last)
        {
            t = t.next;
            sb.append(NodeUtils.tokenLiteral(t));
View Full Code Here

TOP

Related Classes of org.apache.velocity.runtime.parser.Token

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.