com.google.caja.lexer
Class JsTokenQueue
java.lang.Object
com.google.caja.lexer.TokenQueue<JsTokenType>
com.google.caja.lexer.JsTokenQueue
public final class JsTokenQueue
- extends TokenQueue<JsTokenType>
A token queue for javascript.
- Author:
- mikesamuel@gmail.com
Methods inherited from class com.google.caja.lexer.TokenQueue |
advance, checkToken, currentPosition, expectEmpty, expectToken, expectTokenOfType, filteredTokens, getInputRange, getInputSource, getTokenFilter, isEmpty, lastPosition, lookaheadToken, mark, peek, pop, rewind, setInputRange |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NO_COMMENT
public static final Criterion<Token<JsTokenType>> NO_COMMENT
- A criterion that accepts all non-comment tokens.
- See Also:
JsTokenQueue(TokenStream, InputSource, Criterion)
JsTokenQueue
public JsTokenQueue(TokenStream<JsTokenType> lexer,
InputSource file)
JsTokenQueue
public JsTokenQueue(TokenStream<JsTokenType> lexer,
InputSource file,
Criterion<Token<JsTokenType>> filter)
checkToken
public boolean checkToken(Punctuation p)
throws ParseException
- Throws:
ParseException
checkToken
public boolean checkToken(Keyword kw)
throws ParseException
- Throws:
ParseException
expectToken
public void expectToken(Punctuation p)
throws ParseException
- Throws:
ParseException
expectToken
public void expectToken(Keyword kw)
throws ParseException
- Throws:
ParseException
lookaheadToken
public boolean lookaheadToken(Punctuation p)
throws ParseException
- Throws:
ParseException
lookaheadToken
public boolean lookaheadToken(Keyword kw)
throws ParseException
- Throws:
ParseException
Copyright (C) 2008 Google Inc.
Licensed under the Apache License, Version 2.0