|
|||||||||||||||||||
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
LexerTokenStream.java | - | 0% | 0% | 0% |
|
1 |
package org.codehaus.groovy.syntax.lexer;
|
|
2 |
|
|
3 |
import org.codehaus.groovy.syntax.AbstractTokenStream;
|
|
4 |
import org.codehaus.groovy.syntax.SyntaxException;
|
|
5 |
import org.codehaus.groovy.syntax.ReadException;
|
|
6 |
import org.codehaus.groovy.syntax.Token;
|
|
7 |
|
|
8 |
|
|
9 |
/**
|
|
10 |
* Implements a <code>TokenStream</code> on a <code>Lexer</code>.
|
|
11 |
*/
|
|
12 |
|
|
13 |
public class LexerTokenStream |
|
14 |
extends AbstractTokenStream
|
|
15 |
{ |
|
16 |
private Lexer lexer;
|
|
17 |
|
|
18 |
/**
|
|
19 |
* Initializes the <code>LexerTokenStream</code>.
|
|
20 |
*/
|
|
21 |
|
|
22 | 0 |
public LexerTokenStream(Lexer lexer)
|
23 |
{ |
|
24 | 0 |
this.lexer = lexer;
|
25 |
} |
|
26 |
|
|
27 |
|
|
28 |
/**
|
|
29 |
* Returns the underlying <code>Lexer</code>.
|
|
30 |
*/
|
|
31 |
|
|
32 | 0 |
public Lexer getLexer()
|
33 |
{ |
|
34 | 0 |
return this.lexer; |
35 |
} |
|
36 |
|
|
37 |
|
|
38 |
/**
|
|
39 |
* Returns the next token from the <code>Lexer</code>.
|
|
40 |
*/
|
|
41 |
|
|
42 | 0 |
public Token nextToken() throws ReadException, SyntaxException |
43 |
{ |
|
44 | 0 |
return getLexer().nextToken();
|
45 |
} |
|
46 |
} |
|
47 |
|
|