mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-02 13:04:49 +00:00
Fix loading search queries with exclusion #4609
It was failing to load queries like "!IfcWall" or "!2Mg7PHubX0xxOfF0DdA9Wd"
This commit is contained in:
@@ -160,10 +160,16 @@ class ImportFilterQueryTransformer(lark.Transformer):
|
|||||||
return args[0]
|
return args[0]
|
||||||
|
|
||||||
def instance(self, args):
|
def instance(self, args):
|
||||||
return {"type": "instance", "value": " ".join([a.children[0].value for a in args])}
|
if args[0].data == "not":
|
||||||
|
return {"type": "instance", "value": "!" + args[1].children[0].value}
|
||||||
|
else:
|
||||||
|
return {"type": "instance", "value": args[0].children[0].value}
|
||||||
|
|
||||||
def entity(self, args):
|
def entity(self, args):
|
||||||
return {"type": "entity", "value": " ".join([a.children[0].value for a in args])}
|
if args[0].data == "not":
|
||||||
|
return {"type": "entity", "value": "!" + args[1].children[0].value}
|
||||||
|
else:
|
||||||
|
return {"type": "entity", "value": args[0].children[0].value}
|
||||||
|
|
||||||
def attribute(self, args):
|
def attribute(self, args):
|
||||||
name, comparison, value = args
|
name, comparison, value = args
|
||||||
|
|||||||
Reference in New Issue
Block a user