You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fallback to dynamically defining node type predicates
While we have tests which enforce that we're calling
`def_node_type_predicate` for all known `Parser::Meta::NODE_TYPES`, it
is possible for a host application to use a newer version of `parser`,
which might support additional nodes, and for the application to attempt
to access those nodes in custom cops.
To preserve the previous forward compatibility, we fallback to
generating any missing methods. They won't be documented, but at least
they'll work.
The tests will enforce that if rubocop-ast bumps its Parser version, all
node type predicates are generated via `dev_node_type_predicate`.
0 commit comments