Environment
- cbm version: 0.6.0
- Platform: macOS (Darwin arm64)
Bug
Pipe-syntax label alternation in node patterns (standard openCypher MATCH (n:A|B), added in Neo4j 5+) is not supported.
Minimal reproducer
MATCH (n:Class|Method) WHERE n.file_path CONTAINS 'JarvisApp.swift'
RETURN count(n) AS c
Expected: count of all Class-or-Method nodes in the file.
Actual: parse error — expected token type 67, got 83 at pos 14.
Root cause
src/cypher/cypher.h — cbm_node_pattern_t (line 157-163) has a single const char *label field. The AST can only store one label per node pattern; multi-label alternation isn't representable.
Proposed fix
Change cbm_node_pattern_t.label from const char * to const char **labels + int label_count. Update:
parse_node (line 507) to parse pipe-separated label lists
- Every consumer of
node_pattern.label in the executor (pattern matching, scanning, etc.)
free_pattern (line 1509) for cleanup
Architectural change — touches AST + parser + executor + memory management. Reporting for visibility.
Environment
Bug
Pipe-syntax label alternation in node patterns (standard openCypher
MATCH (n:A|B), added in Neo4j 5+) is not supported.Minimal reproducer
Expected: count of all Class-or-Method nodes in the file.
Actual: parse error —
expected token type 67, got 83 at pos 14.Root cause
src/cypher/cypher.h—cbm_node_pattern_t(line 157-163) has a singleconst char *labelfield. The AST can only store one label per node pattern; multi-label alternation isn't representable.Proposed fix
Change
cbm_node_pattern_t.labelfromconst char *toconst char **labels+int label_count. Update:parse_node(line 507) to parse pipe-separated label listsnode_pattern.labelin the executor (pattern matching, scanning, etc.)free_pattern(line 1509) for cleanupArchitectural change — touches AST + parser + executor + memory management. Reporting for visibility.