Ejemplo n.º 1
0
		public void Initialize(MarkdownGrammar grammar)
		{
			var prefix = Terms.sp.Repeat(0, 3);
			var content = (~prefix & Terms.words & -Terms.sp);
			var dlheader = new DoubleLineHeaderSection();
			dlheader.Initialize(grammar);
			var finish = Terminals.Set("#>") | dlheader;
			var lines = content.Repeat(1).SeparatedBy(Terms.eol).Until((Terms.eol & finish.NonCaptured()) | Terms.EndOfSection(minLines: 2), true);
			Add(grammar.Prefix, prefix, lines.Named("lines"));
		}
Ejemplo n.º 2
0
        public void Initialize(MarkdownGrammar grammar)
        {
            var prefix   = Terms.sp.Repeat(0, 3);
            var content  = (~prefix & Terms.words & -Terms.sp);
            var dlheader = new DoubleLineHeaderSection();

            dlheader.Initialize(grammar);
            var finish = Terminals.Set("#>") | dlheader;
            var lines  = content.Repeat(1).SeparatedBy(Terms.eol).Until((Terms.eol & finish.NonCaptured()) | Terms.EndOfSection(minLines: 2), true);

            Add(grammar.Prefix, prefix, lines.Named("lines"));
        }