         i += 1
       }
     }
-    return m
+    m.ignoreCase = ignoreCase
+    let bm = m.assembleMatcher()
+    return Glob(matcher: bm)
   }
 
 }

    return m
  }

  public static func parse(string: String) throws -> GlobMatcher {
    let tokens = try GlobLexer(bytes: string.bytes).parseAllGlobTokens()
    let len = tokens.count
    var m = GlobMatcher()

}


// E.g.
//     var bm2 = try GlobMatcher.parse("hello*.txt").assembleMatcher()
//     p(bm2.match("hello_world.txt")) // Prints true.
//
// The glob features that are understood are these:
//
