public static Expression ParseJsonPath(this string source) { var collector = new ErrorCollector(); var parser = new Parser(new Scanner(new StringBuffer(source)), collector); parser.Parse(); collector.ThrowErrors(); return(parser.result); }