Esempio n. 1
0
        public static ParagraphGrammar InlineParagraph(string title, Action <CompositeGrammarBuilder> configure)
        {
            ParagraphGrammar grammar = Paragraph(title, configure);

            grammar.Style = EmbedStyle.Inline;

            return(grammar);
        }
Esempio n. 2
0
        public static ParagraphGrammar Paragraph(string title, Action <CompositeGrammarBuilder> configure)
        {
            var grammar = new ParagraphGrammar(title);

            grammar.ConfigureSteps(configure);

            return(grammar);
        }
Esempio n. 3
0
        // TODO: tests!
        public static ParagraphGrammar CreateObject <T>(string title, Action <ObjectConstructionExpression <T> > action)
        {
            var grammar    = new ParagraphGrammar(title);
            var expression = new ObjectConstructionExpression <T>(grammar);

            action(expression);

            return(grammar);
        }
Esempio n. 4
0
        public static ParagraphGrammar CreateNewObject <T>(Action <ObjectConstructionExpression <T> > action)
            where T : new()
        {
            var grammar    = new ParagraphGrammar(CreateNewObject <T>());
            var expression = new ObjectConstructionExpression <T>(grammar);

            action(expression);


            return(grammar);
        }
Esempio n. 5
0
 public CompositeGrammarBefore(ParagraphGrammar grammar)
 {
     _grammar = grammar;
 }
Esempio n. 6
0
 public CompositeGrammarBuilder(ParagraphGrammar grammar)
 {
     _grammar = grammar;
 }