Пример #1
0
 public static TokenList CreateInclude()
 {
     return(TokenList.Create(
                new[]
     {
         new Token("include", "{{include other a}}", null),
     }));
 }
Пример #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),
     }));
 }
Пример #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),
     }));
 }
Пример #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),
     }));
 }
Пример #5
0
 public static TokenList CreateEmptyList()
 {
     return(TokenList.Create(Enumerable.Empty <Token>()));
 }
Пример #6
0
 public static TokenList CreateUnknownToken()
 {
     return(TokenList.Create(new[] { new Token("unknown", "abc", null), }));
 }
Пример #7
0
 public static TokenList CreateOnePropertyNodeEvaluatingSelf()
 {
     return(TokenList.Create(new[] { new Token("property", "{{}}", null) }));
 }
Пример #8
0
 public static TokenList CreateOnePropertyNode()
 {
     return(TokenList.Create(new[] { new Token("property", "{{a}}", null) }));
 }
Пример #9
0
 public static TokenList CreateConstantNode()
 {
     return(TokenList.Create(new[] { new Token("constant", "test", null) }));
 }
Пример #10
0
 public static TokenList ToTokenList(this IEnumerable <Token> tokens)
 {
     return(TokenList.Create(tokens));
 }