ant file to make all swift nodes implement Node

This commit is contained in:
lsoncini
2019-02-17 02:16:24 -03:00
parent 0b650f6a00
commit dd841d6ccb
2 changed files with 35 additions and 0 deletions

View File

@ -10,8 +10,33 @@
<version>7.0.0-SNAPSHOT</version>
</parent>
<properties>
<antlr4.visitor>true</antlr4.visitor>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<inherited>true</inherited>
<executions>
<execution>
<id>process-sources</id>
<phase>process-sources</phase>
<configuration>
<target>
<ant antfile="src/main/ant/antlr4.xml">
<property name="target" value="${project.build.directory}/generated-sources/antlr4" />
</ant>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId>

View File

@ -0,0 +1,10 @@
<project name="pmd" default="antlr4" basedir="../../../../">
<property name="target-package-dir" value="${target}/net/sourceforge/pmd/lang/swift/antlr4" />
<target name="antlr4" description="Generates all Antlr4 aspects within PMD">
<replace file="${target-package-dir}/SwiftParser.java"
token="extends ParserRuleContext"
value="extends net.sourceforge.pmd.lang.ast.AntlrBaseNode" />
</target>
</project>