Esempio n. 1
0
        public GlobNode Parse(string pattern, GlobberSettings settings)
        {
            var buffer          = GlobTokenizer.Tokenize(pattern);
            var isCaseSensitive = settings.IsCaseSensitive ?? _environment.Platform.IsUnix();

            return(Parse(new GlobParserContext(buffer, isCaseSensitive)));
        }
Esempio n. 2
0
        public GlobParserContext(string pattern, bool caseSensitive)
        {
            _tokenizer    = new GlobTokenizer(pattern);
            _currentToken = null;
            _regexOptions = RegexOptions.Compiled | RegexOptions.Singleline;

            if (!caseSensitive)
            {
                _regexOptions |= RegexOptions.IgnoreCase;
            }
        }