org.codehaus.groovy.control.CompilerConfiguration:

    public void setPluginFactory(ParserPluginFactory pluginFactory) {
        this.pluginFactory = pluginFactory;
    }

You cannot control what the user sets here.  The contract is that they supply a 
ParserPluginFactory and you use it to create parsers.  You should not be 
checking instanceof against the ParserPluginFactory or the ParserPlugin 
instances that it creates.


Also, Antlr2Utils.parse("DummyNode<" + option + ">") is not working correctly 
in GenericsUtils#parseClassNodesFromString.
________________________________
From: Daniel.Sun <sun...@apache.org>
Sent: Tuesday, October 22, 2019 12:18 PM
To: d...@groovy.incubator.apache.org <d...@groovy.incubator.apache.org>
Subject: Re: [VOTE] Release Apache Groovy 3.0.0-rc-1 (take 2)

The `static` method `antlr4` only creates `Antlr4PluginFactory` instance, so
I wonder how to make it create
`org.codehaus.groovy.control.ParserPluginFactory$1` instance?

public abstract class ParserPluginFactory {
    /**
     * creates the ANTLR 4 parser
     * @return the factory for the parser
     */
    public static ParserPluginFactory antlr4(CompilerConfiguration
compilerConfiguration) {
        return new Antlr4PluginFactory(compilerConfiguration);
    }
    ...
}

Cheers,
Daniel.Sun



-----
Apache Groovy committer & PMC member
Blog: 
https://urldefense.proofpoint.com/v2/url?u=http-3A__blog.sunlan.me&d=DwICAg&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=3sXRMCApJsjZv28Q1RZV35AK1UIRNphVxm6-dmKB8F0&s=MndXtn8Ks91u-uuTXNVmqT8mg7L-MJZ1y6Cyyy4_UdM&e=
Twitter: @daniel_sun

--
Sent from: 
https://urldefense.proofpoint.com/v2/url?u=http-3A__groovy.329449.n5.nabble.com_Groovy-2DDev-2Df372993.html&d=DwICAg&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=3sXRMCApJsjZv28Q1RZV35AK1UIRNphVxm6-dmKB8F0&s=zCP1rCCMskZnfGGWYRqQJRGEVykB8F5pyC-V72K3K1Q&e=

Reply via email to