Exemplo n.º 1
0
        public void TestMethod1()
        {
            string code = "This is a test {{DateTime.Now}}  and another {{System.Environment.CurrentDirectory}}";

            var parser = new ScriptParser();
            var tokens = parser.TokenizeString(ref code, "{{", "}}");

            Console.WriteLine(code);

            foreach (var token in tokens)
            {
                Console.WriteLine(token);
            }

            code = parser.DetokenizeString(code, tokens);

            Console.WriteLine("returned");
            Console.WriteLine(code);
        }