mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 02:47:48 +00:00
5c11946470
The filter_elements selector grammar had no way to comment out part of a query, so users had to delete and retype text to temporarily toggle a facet. Add a /* ... */ block comment terminal that is ignored by the lexer, and tolerate a trailing "+" so that commenting out the final operand (e.g. "IfcWall + /* IfcSlab */") parses cleanly. Comments may span multiple lines; a /* sequence inside a quoted string is not treated as a comment. Only the filter grammar is affected, not get_element or format which use "/" for regex and division. Adds a regression test and documents the syntax. Generated with the assistance of an AI coding tool. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>