com.aptana.ide.editor.js.environment
Class JSLexemeListWalker
java.lang.Object
com.aptana.ide.editor.js.environment.LexemeListWalker
com.aptana.ide.editor.js.environment.JSLexemeListWalker
public class JSLexemeListWalker
- extends LexemeListWalker
Walks a list of JSLexemes, performing a function on each one
|
Method Summary |
protected void |
onLexeme(Lexeme lexeme,
int index)
The method called on each lexeme |
int |
walkList(IParseState parseState,
int startIndex)
Walks the list of lexemes, calling "onLexeme" on each one |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JSLexemeListWalker
protected JSLexemeListWalker(Environment env,
IScope initialScope,
LexemeBasedEnvironmentLoader envLoader)
- Creates a new instance of JSLexemeListWalker
- Parameters:
env - The current JS environmentinitialScope - The initial scopeenvLoader - The current environment loader
walkList
public int walkList(IParseState parseState,
int startIndex)
- Description copied from class:
LexemeListWalker
- Walks the list of lexemes, calling "onLexeme" on each one
- Overrides:
walkList in class LexemeListWalker
- Parameters:
parseState - The current parse statestartIndex - The lexeme list index at which to begin walking
- Returns:
- The ending index (generally the last index of the list)
- See Also:
LexemeListWalker.walkList(IParseState, int)
onLexeme
protected void onLexeme(Lexeme lexeme,
int index)
throws LexemeListWalker.AbortException
- Description copied from class:
LexemeListWalker
- The method called on each lexeme
- Specified by:
onLexeme in class LexemeListWalker
- Parameters:
lexeme - The lexeme to processindex - the index of the lexeme in the lexeme list
- Throws:
LexemeListWalker.AbortException - An exception to throw if we wish to abort the walking operation- See Also:
LexemeListWalker.onLexeme(Lexeme, int)