Patch from Matt Quail to stop the ugly hack of having hard

coded constants in TokenTypes. The big risk was that when
the grammar changed, the generated constants could
change. (patch 757846)
This commit is contained in:
Oliver Burn 2003-06-21 12:34:01 +00:00
parent f4a85d495c
commit e03dab4d1f
4 changed files with 166 additions and 147 deletions

View File

@ -113,6 +113,20 @@
<arg value="java.g" />
<arg value="java14.g" />
</java>
<!-- now copy 'GeneratedJava14TokenTypes.java' into the api package. -->
<!-- It is used by TokenTypes.java, and a circular package dependency -->
<!-- would ensue if it wasn't copied -->
<copy file="src/checkstyle/com/puppycrawl/tools/checkstyle/GeneratedJava14TokenTypes.java"
todir="src/checkstyle/com/puppycrawl/tools/checkstyle/api"/>
<replace file="src/checkstyle/com/puppycrawl/tools/checkstyle/api/GeneratedJava14TokenTypes.java">
<replacefilter
token="package com.puppycrawl.tools.checkstyle;"
value="package com.puppycrawl.tools.checkstyle.api;"/>
<replacefilter
token="public interface "
value="interface "/>
</replace>
</target>
<!-- -->

View File

@ -81,6 +81,10 @@
<li class="body">Nice patch from Matt Quail to DetailAST to replace all the
repeated int[] array construction with a BitSet.</li>
<li class="body">Patch from Matt Quail to stop the ugly hack of having hard coded
constants in TokenTypes. The big risk was that when the grammar changed, the generated
constants could change. (patch 757846)</li>
</ul>
<p class="body">

View File

@ -0,0 +1 @@
GeneratedJava14TokenTypes.java