public PreprocessorTokenParser(
     IEnumerable <char> text,
     string path = null,
     int file    = -1)
 {
     Text = new TrimWhitePreprocessor(
         text,
         path: path,
         file: file);
 }
Exemple #2
0
            public Builder(TrimWhitePreprocessor owner)
            {
                Owner = owner
                        ?? throw new ArgumentNullException(nameof(owner));

                Special = new Dictionary <char, Func <IEnumerable <TextUnit> > >()
                {
                    { ' ', TrimWhiteSpace },
                    { '\t', TrimWhiteSpace },
                    { ';', TrimLineComment },
                    { '/', TrimBlockComment },
                    { '"', AppendQuoteText },
                    { '\'', AppendQuoteText },
                };

                BaseEnumerator = Owner.GetEnumerator();
            }