Antlr4.Codegen.AbstractTarget.GetRecognizerFileName C# (CSharp) Method

GetRecognizerFileName() public method

public GetRecognizerFileName ( bool header ) : string
header bool
return string
        public virtual string GetRecognizerFileName(bool header)
        {
            Template extST = GetTemplates().GetInstanceOf("codeFileExtension");
            string recognizerName = gen.g.GetRecognizerName();
            return recognizerName + extST.Render();
        }

Usage Example

Example #1
0
        public virtual string GetRecognizerFileName(bool header)
        {
            AbstractTarget target = GetTarget();

            if (target == null)
            {
                throw new NotSupportedException("Cannot generate code without a target.");
            }

            return(target.GetRecognizerFileName(header));
        }