com.metaweb.lessen.tokenizers
Class IndentingTokenizer

java.lang.Object
  extended by com.metaweb.lessen.tokenizers.IndentingTokenizer
All Implemented Interfaces:
Tokenizer

public class IndentingTokenizer
extends Object
implements Tokenizer


Field Summary
protected  String _indent
           
protected  List<String> _indents
           
protected  BufferedTokenizer _tokenizer
           
protected  List<Token> _tokens
           
 
Constructor Summary
IndentingTokenizer(Tokenizer tokenizer)
           
IndentingTokenizer(Tokenizer tokenizer, String indent)
           
 
Method Summary
protected  void breakLine(Token t)
           
protected  void getMore()
           
 Token getToken()
           
protected  void indent(Token t, int level)
           
protected  String makeIndent(int level)
           
 void next()
           
protected  void processBlock(int level)
           
protected  void processStatement(int level)
           
protected  void processTrailingComments()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_tokenizer

protected final BufferedTokenizer _tokenizer

_indent

protected final String _indent

_tokens

protected final List<Token> _tokens

_indents

protected final List<String> _indents
Constructor Detail

IndentingTokenizer

public IndentingTokenizer(Tokenizer tokenizer)

IndentingTokenizer

public IndentingTokenizer(Tokenizer tokenizer,
                          String indent)
Method Detail

getToken

public Token getToken()
Specified by:
getToken in interface Tokenizer

next

public void next()
Specified by:
next in interface Tokenizer

getMore

protected void getMore()

processStatement

protected void processStatement(int level)

processBlock

protected void processBlock(int level)

processTrailingComments

protected void processTrailingComments()

breakLine

protected void breakLine(Token t)

indent

protected void indent(Token t,
                      int level)

makeIndent

protected String makeIndent(int level)


Copyright © 2011. All Rights Reserved.