Exemple #1
0
 public static TokenList CreateInclude()
 {
     return(TokenList.Create(
                new[]
     {
         new Token("include", "{{include other a}}", null),
     }));
 }
Exemple #2
0
 public static TokenList CreateForEach()
 {
     return(TokenList.Create(
                new[]
     {
         new Token("foreach", "{{foreach a}}", null),
         new Token("constant", "test", null),
         new Token("endfor", "{{endfor}}", null),
     }));
 }
Exemple #3
0
 public static TokenList CreateEofInMiddle()
 {
     return(TokenList.Create(
                new[]
     {
         new Token("property", "{{a}}", null),
         new Token("(eof)", null, null),
         new Token("constant", "test", null),
     }));
 }
Exemple #4
0
 public static TokenList CreateIf()
 {
     return(TokenList.Create(
                new[]
     {
         new Token("if", "{{if b}}", null),
         new Token("constant", "test", null),
         new Token("endif", "{{endif}}", null),
     }));
 }
Exemple #5
0
 public static TokenList CreateEmptyList()
 {
     return(TokenList.Create(Enumerable.Empty <Token>()));
 }
Exemple #6
0
 public static TokenList CreateUnknownToken()
 {
     return(TokenList.Create(new[] { new Token("unknown", "abc", null), }));
 }
Exemple #7
0
 public static TokenList CreateOnePropertyNodeEvaluatingSelf()
 {
     return(TokenList.Create(new[] { new Token("property", "{{}}", null) }));
 }
Exemple #8
0
 public static TokenList CreateOnePropertyNode()
 {
     return(TokenList.Create(new[] { new Token("property", "{{a}}", null) }));
 }
Exemple #9
0
 public static TokenList CreateConstantNode()
 {
     return(TokenList.Create(new[] { new Token("constant", "test", null) }));
 }
Exemple #10
0
 public static TokenList ToTokenList(this IEnumerable <Token> tokens)
 {
     return(TokenList.Create(tokens));
 }