forked from phoedos/pmd
[xml] Have pmd-xml Lexer in line with other antlr grammars (#5296)
Merge pull request #5296 from Monits:align-xml-antlr
This commit is contained in:
commit
a709be1dcb
@ -18,6 +18,11 @@ This is a {{ site.pmd.release_type }} release.
|
||||
|
||||
### 🚨 API Changes
|
||||
|
||||
#### Deprecations
|
||||
* pmd-xml
|
||||
* {%jdoc xml::lang.xml.antlr4.XMLLexer %} is deprecated for removal. Use {%jdoc !!xml::lang.xml.ast.XMLLexer %}
|
||||
instead (note different package `ast` instead of `antlr4`).
|
||||
|
||||
### ✨ External Contributions
|
||||
|
||||
{% endtocmaker %}
|
||||
|
@ -45,6 +45,28 @@
|
||||
</parameter>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>antlr-cleanup</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<ant antfile="${antlr4.ant.wrapper}" target="cpd-language">
|
||||
<property name="lang-name" value="XML" />
|
||||
<property name="lang-id" value="xml" />
|
||||
</ant>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
|
@ -0,0 +1,21 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.lang.xml.antlr4;
|
||||
|
||||
import org.antlr.v4.runtime.CharStream;
|
||||
|
||||
/**
|
||||
* Backwards compatible bridge. The XMLLexer was moved to align it with other PMD modules.
|
||||
* This class will be removed in PMD 8.0.0.
|
||||
* Use {@link net.sourceforge.pmd.lang.xml.ast.XMLLexer} directly instead.
|
||||
*
|
||||
* @deprecated since 7.8.0. Use {@link net.sourceforge.pmd.lang.xml.ast.XMLLexer} directly instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public class XMLLexer extends net.sourceforge.pmd.lang.xml.ast.XMLLexer {
|
||||
public XMLLexer(CharStream input) {
|
||||
super(input);
|
||||
}
|
||||
}
|
@ -8,7 +8,7 @@ import org.antlr.v4.runtime.CharStream;
|
||||
import org.antlr.v4.runtime.Lexer;
|
||||
|
||||
import net.sourceforge.pmd.cpd.impl.AntlrCpdLexer;
|
||||
import net.sourceforge.pmd.lang.xml.antlr4.XMLLexer;
|
||||
import net.sourceforge.pmd.lang.xml.ast.XMLLexer;
|
||||
|
||||
/**
|
||||
* <p>Note: This class has been called XmlTokenizer in PMD 6</p>.
|
||||
|
Loading…
x
Reference in New Issue
Block a user