Annotate Antlr generated classes for PMD languages

This commit is contained in:
Juan Martín Sotuyo Dodero 2024-10-06 20:07:47 -03:00
parent 31018611c6
commit f68130eaf9
3 changed files with 5 additions and 1 deletions

View File

@ -179,7 +179,9 @@ public class ${lexer-name}'/>
</delete>
</target>
<target name="pmd-language" description="Adapt Antlr sources for PMD languages" depends="rename-parser">
<target name="pmd-language" depends="check-up-to-date, annotate-classes, pmd-language-processing, update-stamp-file"/>
<target name="pmd-language-processing" description="Adapt Antlr sources for PMD languages" depends="rename-parser"
unless="processing-not-required">
<!-- Adapt parser. -->
<replace file="${parser-file}">

View File

@ -43,6 +43,7 @@
<configuration>
<target>
<ant antfile="${antlr4.ant.wrapper}" target="pmd-language">
<property name="ant.contrib.jar" value="${ant.contrib.jar}" />
<property name="lang-name" value="Kotlin" />
<property name="lang-id" value="kotlin" />
<property name="root-node-name" value="KotlinFile" />

View File

@ -42,6 +42,7 @@
<configuration>
<target>
<ant antfile="${antlr4.ant.wrapper}" target="pmd-language">
<property name="ant.contrib.jar" value="${ant.contrib.jar}" />
<property name="lang-name" value="Swift" />
<property name="lang-id" value="swift" />
<property name="root-node-name" value="TopLevel" />