Rulechain visits are for now entirely handled as strings:
private List<String> ruleChainVisits = new ArrayList<>();The implementation also throws an exception (!) if the node class doesn't have a hardcoded "AST" prefix:
public void addRuleChainVisit(Class<? extends Node> nodeClass) { if (!nodeClass.getSimpleName().startsWith("AST")) { throw new IllegalArgumentException("Node class does not start with 'AST' prefix: " + nodeClass); } addRuleChainVisit(nodeClass.getSimpleName().substring("AST".length())); }Introducing some abstractions into the AST (like done in #1759, argumented on the wiki) has a number of advantages, but the current rulechain implementation doesn't scale. Adding a rulechain visit to an abstract node type currently does nothing, instead of visiting all nodes having the specified supertype.
Refs #1772
There's the exact same problem with XPath queries, which I'll explain in another issue
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4