Exemplo n.º 1
0
        private void Lex(object sender, StyleNeededEventArgs e)
        {
            var lexer  = new OutputLexer();
            var tokens = lexer.Parse(e.Text).ToList();

            if (!styling)
            {
                tokens = tokens.Where(t => t.StyleKey == TextStyle.Invisible).ToList();
            }

            tokens.ForEach(t => e.AddStyleItem(t.Position, t.Length, t.StyleKey));
        }
Exemplo n.º 2
0
        private void Lex(object sender, StyleNeededEventArgs e)
        {
            var lexer = new OutputLexer();
            var tokens = lexer.Parse(e.Text).ToList();

            if (!styling)
                tokens = tokens.Where(t => t.StyleKey == TextStyle.Invisible).ToList();

            tokens.ForEach(t => e.AddStyleItem(t.Position, t.Length, t.StyleKey));
        }