Skip to content

Commit

Permalink
added explicit registerNames to Collector, for reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mie6 committed Apr 16, 2024
1 parent 8daf975 commit b0540f5
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ object Collector {
Renamer.addNames(XCollector.collectNames(obj))
}

def registerNames(names: Map[Parsley[_], String]): Unit = {
Renamer.addNames(names.map {
case (k, v) => k.internal -> v
})
}

/** Collect names of parsers from a [[parsley.token.Lexer]].
*
* @note For Scala 3 on the JVM, this may trigger a warning about `setAccessible` for private members
Expand Down

0 comments on commit b0540f5

Please sign in to comment.