From 37a3b814ead0ae2f74170e676d244f2e02ef393e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20K=C3=BChne?= Date: Sat, 11 Jan 2003 06:49:12 +0000 Subject: [PATCH] Removed TokenTypes that never occur in a tree. Prevents mistakes like registering a Check to EOL to analyse the end of a file. --- .../tools/checkstyle/api/TokenTypes.java | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/api/TokenTypes.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/api/TokenTypes.java index 0ee8e743b..382c16fd6 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/api/TokenTypes.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/api/TokenTypes.java @@ -34,12 +34,20 @@ import java.lang.reflect.Field; */ public class TokenTypes { - /** token representing a EOF */ - public static final int EOF = 1; - /** token representing a NULL_TREE_LOOKAHEAD */ - public static final int NULL_TREE_LOOKAHEAD = 3; - /** token representing a BLOCK */ - public static final int BLOCK = 4; + // The following three types are never part of an AST, + // left here as a reminder so nobody will readd them accidentally + + /* * token representing a EOF */ + // public static final int EOF = 1; + /* * token representing a NULL_TREE_LOOKAHEAD */ + // public static final int NULL_TREE_LOOKAHEAD = 3; + /* * token representing a BLOCK */ + // public static final int BLOCK = 4; + + + // These are the types that can actually occur in an AST + // it makes sense to register CHecks for these types + /** token representing a MODIFIERS */ public static final int MODIFIERS = 5; /** token representing a OBJBLOCK */