Example #1
0
        public IEnumerable<TaskItem> Parse(string source)
        {
            if (String.IsNullOrEmpty(source))
                return new List<TaskItem>();

            using (var ms = new MemoryStream(Encoding.UTF8.GetBytes(source)))
            {
                var s = new Scanner(ms);
                var p = new Parser(s) { ProcessTasks = true };
                p.Parse();
                return p.Tasks;
            }
        }
Example #2
0
        public IEnumerable<StyledToken> Parse(string source)
        {
            if (String.IsNullOrEmpty(source))
                return new List<StyledToken>();

            using (var ms = new MemoryStream(Encoding.UTF8.GetBytes(source)))
            {
                var s = new Scanner(ms);
                var p = new Parser(s);
                p.Parse();
                return p.Markers;
            }
        }