Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ast: Update rule index to support glob.match
These changes update the rule index to support glob.match calls. The changes update the build step to transform glob.match(pattern, delimiter, match) calls into ref/value pairs like equality expressions. In addition, the build step creates a mapper function that transforms resolved values into lookup values during traversal. As part of these changes, the build operation has been refactored so that most of the process is encapsulated by a new refindices struct that's separate from the actual rule index/trie. Hopefully this makes the code easier to follow. The index build step for glob.match only recognizes statements where the match operand was given as a reference (and then was rewritten by the earlier step in the compiler.) If this is too brittle we could revisit the build step and close over all intermediate assignments. Fixes #1496 Signed-off-by: Torin Sandall <torinsandall@gmail.com>
- Loading branch information