Refactor rules parser to include next_node_rules capture

Fits with pattern used by other element parsers