Antlr4.StringTemplate.TemplateGroupFile.Load C# (CSharp) Method

Load() protected method

protected Load ( string name ) : CompiledTemplate
name string
return Antlr4.StringTemplate.Compiler.CompiledTemplate
        protected override CompiledTemplate Load(string name)
        {
            if (!_alreadyLoaded)
                Load();

            return RawGetTemplate(name);
        }

Same methods

TemplateGroupFile::Load ( ) : void

Usage Example

Example #1
0
        public void TestCantDefineEmbeddedRegionAgain()
        {
            string dir = tmpdir;
            string g = "a() ::= <<[<@r>foo<@end>]>>\n" +
                       "@a.r() ::= <<bar>>\n"; // error; dup
            writeFile(dir, "g.stg", g);

            TemplateGroupFile group = new TemplateGroupFile(Path.Combine(dir, "g.stg"));
            ErrorBuffer errors = new ErrorBuffer();
            group.Listener = errors;
            group.Load();
            string expected = "g.stg 2:3: the explicit definition of region /a.r hides an embedded definition in the same group" + newline;
            string result = errors.ToString();
            Assert.AreEqual(expected, result);
        }
All Usage Examples Of Antlr4.StringTemplate.TemplateGroupFile::Load