class ActionDispatch::Journey::GTG::Builder
def firstpos(node)
Experimental RBS support (using type sampling data from the type_fusion
project).
def firstpos: (ActionDispatch::Journey::Nodes::Symbol node) -> Array[ActionDispatch::Journey::Nodes::Symbol]
This signature was generated using 2 samples from 1 application.
def firstpos(node) case node when Nodes::Star firstpos(node.left) when Nodes::Cat if nullable?(node.left) firstpos(node.left) | firstpos(node.right) else firstpos(node.left) end when Nodes::Or node.children.flat_map { |c| firstpos(c) }.tap(&:uniq!) when Nodes::Unary firstpos(node.left) when Nodes::Terminal nullable?(node) ? [] : [node] else raise ArgumentError, "unknown firstpos: %s" % node.class.name end end