Example #1
0
        // DelimitedTextSyntax
        public bool TryParseTemplateBodySyntax(Lexer lexer, out TemplateBodySyntax result)
        {
            var syntaxList = new List <ITemplateBodySyntaxContent>(1024);

            while (
                lexer.CanRead() &&
                this.CanParseClassFeatureBlock(lexer) == false)

            {
                {
                    if (this.TryParseControlBlock(lexer, out var r))
                    {
                        syntaxList.Add(r);
                        continue;
                    }
                }


                {
                    if (this.TryParseDirectiveSyntax(lexer, out var r))
                    {
                        syntaxList.Add(r);
                        continue;
                    }
                }


                {
                    if (this.TryParseStaticTextSyntax(
                            lexer,
                            out var r))
                    {
                        syntaxList.Add(r);
                        continue;
                    }
                }
            }

            result = new TemplateBodySyntax(syntaxList);
            return(true);
        }         // Parse method end
Example #2
0
        public TemplateSyntax(DirectiveSyntaxList Directives, TemplateBodySyntax TemplateBody)
        {
            this.Directives = Directives;

            this.TemplateBody = TemplateBody;
        }