Пример #1
0
            public List <object> Call(List <object> args)
            {
                var newSymbolName = (string)args[1];

                return(new List <object> {
                    Tuple.Create(newSymbolName, InterpreterCodeGenerator.Assignment(newSymbolName, (string)args[4]))
                });
            }
Пример #2
0
            public List <object> Call(List <object> args)
            {
                var assignment = (Tuple <string, string>)args[1];

                return(new List <object> {
                    Tuple.Create(assignment.Item1, InterpreterCodeGenerator.FallbackPoint(assignment.Item2))
                });
            }
Пример #3
0
            public List <object> Call(List <object> args)
            {
                var start = string.IsNullOrEmpty((string)args[2]) ? "null" : (string)args[2];
                var end   = string.IsNullOrEmpty((string)args[4]) ? "null" : (string)args[4];

                return(new List <object> {
                    InterpreterCodeGenerator.Repeat((string)args[0], start, end)
                });
            }
Пример #4
0
 public List <object> Call(List <object> args)
 {
     if (args.Count == 1)
     {
         return(args);
     }
     return(new List <object> {
         InterpreterCodeGenerator.Any(args.Where(x => (string)x != "|").Cast <string>())
     });
 }
Пример #5
0
 public List <object> Call(List <object> args)
 {
     if (args.Count == 1)
     {
         return(args);
     }
     return(new List <object> {
         InterpreterCodeGenerator.InOrder(args.Cast <string>())
     });
 }
Пример #6
0
 public List <object> Call(List <object> args)
 {
     return(new List <object> {
         InterpreterCodeGenerator.Range(((string)args[1])[0], ((string)args[3])[0])
     });
 }
Пример #7
0
 public List <object> Call(List <object> args)
 {
     return(new List <object> {
         InterpreterCodeGenerator.AnyChar()
     });
 }
Пример #8
0
 public List <object> Call(List <object> args)
 {
     return(new List <object> {
         InterpreterCodeGenerator.Symbol(((string)args[1]).Replace("\"", "\\\""))
     });
 }
Пример #9
0
 public List <object> Call(List <object> args)
 {
     return(InterpreterCodeGenerator.EntryPoint(args.Cast <string>()).Cast <object>().ToList());
 }
Пример #10
0
            public List <object> Call(List <object> args)
            {
                var castArgs = args.Take(args.Count - 1).Cast <Tuple <string, string> >().ToArray();

                return(InterpreterCodeGenerator.AllAssignments(castArgs).Cast <object>().ToList());
            }
Пример #11
0
 public List <object> Call(List <object> args)
 {
     return(new List <object> {
         InterpreterCodeGenerator.Negate((string)args[1])
     });
 }