Switch to sqlite3's lemon parser generator.
[oweals/jsonpath.git] / matcher.c
index 9d2aa89e878ea715732a66e3f7a94c3b375c60ff..7fb6d0224f748fffbc092a575f5bdad20f86de8e 100644 (file)
--- a/matcher.c
+++ b/matcher.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013 Jo-Philipp Wich <jow@openwrt.org>
+ * Copyright (C) 2013-2014 Jo-Philipp Wich <jow@openwrt.org>
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -14,6 +14,7 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include "parser.h"
 #include "matcher.h"
 
 static struct json_object *
@@ -164,6 +165,7 @@ jp_expr(struct jp_opcode *op, struct json_object *root, struct json_object *cur,
                return true;
 
        case T_OR:
+       case T_UNION:
                for (sop = op->down; sop; sop = sop->sibling)
                        if (jp_expr(sop, root, cur, idx, key, cb, priv))
                                return true;