aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/anarres/cpp/TokenSnifferSource.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/anarres/cpp/TokenSnifferSource.java')
-rw-r--r--src/main/java/org/anarres/cpp/TokenSnifferSource.java49
1 files changed, 20 insertions, 29 deletions
diff --git a/src/main/java/org/anarres/cpp/TokenSnifferSource.java b/src/main/java/org/anarres/cpp/TokenSnifferSource.java
index 1512b2e..21e1cb8 100644
--- a/src/main/java/org/anarres/cpp/TokenSnifferSource.java
+++ b/src/main/java/org/anarres/cpp/TokenSnifferSource.java
@@ -14,41 +14,32 @@
* or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
-
package org.anarres.cpp;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
import java.io.IOException;
-import java.io.PushbackReader;
-import java.io.Reader;
-import java.io.StringReader;
-
-import java.util.ArrayList;
import java.util.List;
-import java.util.Iterator;
-
-import static org.anarres.cpp.Token.*;
+import static org.anarres.cpp.Token.EOF;
@Deprecated
/* pp */ class TokenSnifferSource extends Source {
- private List<Token> target;
-
- /* pp */ TokenSnifferSource(List<Token> target) {
- this.target = target;
- }
-
- public Token token()
- throws IOException,
- LexerException {
- Token tok = getParent().token();
- if (tok.getType() != EOF)
- target.add(tok);
- return tok;
- }
- public String toString() {
- return getParent().toString();
- }
+ private final List<Token> target;
+
+ /* pp */ TokenSnifferSource(List<Token> target) {
+ this.target = target;
+ }
+
+ public Token token()
+ throws IOException,
+ LexerException {
+ Token tok = getParent().token();
+ if (tok.getType() != EOF)
+ target.add(tok);
+ return tok;
+ }
+
+ @Override
+ public String toString() {
+ return getParent().toString();
+ }
}