コード例 #1
0
            public Builder(TextPreprocessor owner)
            {
                Owner = owner
                        ?? throw new ArgumentNullException(nameof(owner));

                BaseEnumerator = Owner.Text.GetEnumerator();
                Special        =
                    new Dictionary <char, Func <IEnumerable <TextUnit> > >()
                {
                    { '\r', ConvertToNewLine },
                    { '?', ConvertTrigraph },
                };
            }
コード例 #2
0
        public TrimWhitePreprocessor(
            IEnumerable <char> text,
            bool allowSplice = false,
            string path      = null,
            int file         = -1)
        {
            Text = new TextPreprocessor(
                text,
                resolveTrigraphs: true,
                forceAscii: false,
                addTrailingNewLine: true,
                trimTrailingNewLine: true,
                file: file);

            Path = path;
        }