Antlr4.Tool.Grammar.GetGrammarTypeToFileNameSuffix C# (CSharp) Method

GetGrammarTypeToFileNameSuffix() public static method

public static GetGrammarTypeToFileNameSuffix ( int type ) : string
type int
return string
        public static string GetGrammarTypeToFileNameSuffix(int type)
        {
            switch (type)
            {
            case ANTLRParser.LEXER:
                return "Lexer";
            case ANTLRParser.PARSER:
                return "Parser";
            // if combined grammar, gen Parser and Lexer will be done later
            // TODO: we are separate now right?
            case ANTLRParser.COMBINED:
                return "Parser";
            default:
                return "<invalid>";
            }
        }