All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sourceforge.pmd.lang.go.GoLanguageModule Maven / Gradle / Ivy

There is a newer version: 7.7.0
Show newest version
/*
 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
 */

package net.sourceforge.pmd.lang.go;

import net.sourceforge.pmd.cpd.CpdLexer;
import net.sourceforge.pmd.lang.LanguagePropertyBundle;
import net.sourceforge.pmd.lang.LanguageRegistry;
import net.sourceforge.pmd.lang.go.cpd.GoCpdLexer;
import net.sourceforge.pmd.lang.impl.CpdOnlyLanguageModuleBase;

public class GoLanguageModule extends CpdOnlyLanguageModuleBase {
    private static final String ID = "go";

    public GoLanguageModule() {
        super(LanguageMetadata.withId(ID).name("Go").extensions("go"));
    }

    public static GoLanguageModule getInstance() {
        return (GoLanguageModule) LanguageRegistry.CPD.getLanguageById(ID);
    }

    @Override
    public CpdLexer createCpdLexer(LanguagePropertyBundle bundle) {
        return new GoCpdLexer();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy