org.peaseplate.internal.parser
Class TemplateScanner
java.lang.Object
org.peaseplate.internal.parser.TemplateScanner
public class TemplateScanner
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TemplateScanner
public TemplateScanner(TemplateEngine engine,
TemplateLocator locator)
throws TemplateException
- Throws:
TemplateException
getEngine
public TemplateEngine getEngine()
getLocator
public TemplateLocator getLocator()
getSource
public char[] getSource()
next
public Token next(int level)
throws TemplateException
- Throws:
TemplateException
current
public Token current()
ensureQueue
protected void ensureQueue(int level)
throws TemplateException
- Throws:
TemplateException
trim
protected void trim()
isTrimable
protected boolean isTrimable()
- Returns true if the current line in the queue is trimable.
A line is trimable if does not contain at lease one visible
token. If there is a visible token, it is not trimable.
An empty line should not be cut, only if it contains
at lease one essential chunk.
- Returns:
- true if trimable
nextToken
protected Token nextToken(int skipInitialTabs)
throws TemplateScannerException
- Throws:
TemplateScannerException
nextVisibleChar
protected void nextVisibleChar()
nextChar
protected void nextChar()
Copyright © 2008. All Rights Reserved.