Process() public static method

public static Process ( GlobNode node ) : string
node GlobNode
return string
Exemplo n.º 1
0
        private void Compile()
        {
            if (_root != null)
            {
                return;
            }

            var parser = new Parser(this.Pattern);

            _root = parser.Parse();

            //TODO: this is basically cheating and probably not efficient but it works for now.
            _regex = new Regex(GlobToRegexVisitor.Process(_root), RegexOptions.Compiled);
        }
Exemplo n.º 2
0
        private void Compile()
        {
            if (_root != null)
            {
                return;
            }

            if (_regex != null)
            {
                return;
            }

            var parser = new Parser(this.Pattern);

            _root = parser.Parse();

            var regexPattern = GlobToRegexVisitor.Process(_root);

            _regex = new Regex(regexPattern, _options == GlobOptions.Compiled ? RegexOptions.Compiled | RegexOptions.Singleline : RegexOptions.Singleline);
        }