Skip to content

Commit

Permalink
doc(debug): unified doc in package object
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mie6 committed Dec 28, 2024
1 parent ddcde01 commit c579797
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import parsley.debug.internal.XIllegalStateException
* implement single-use views as a `class` of some sort inheriting from [[DebugView.SingleUse]].
*
* @since 5.0.0
* @group debugview
*/
sealed trait DebugView {
/** Render a debug tree.
Expand All @@ -29,6 +30,7 @@ sealed trait DebugView {
*/
private [debug] def render(input: =>String, tree: =>DebugTree): Unit
}
/** @group debugview */
object DebugView {
/** Signifies that the debug view inheriting from this can be used multiple times.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import scala.annotation.tailrec
* on attaching debuggers to find out how to prevent that.
*
* @since 5.0.0
* @group debugview
*/
object PrintView extends DebugView.Reusable with PrintView {
override protected val out: PrintStream = Console.out
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import parsley.internal.deepembedding.backend.debug.{CheckDivergence, Debugging}
/** This object contains the combinators for attaching debuggers to parsers.
*
* @since 4.5.0
* @group debugcomb
*/
object combinator {
/** Shorthand representation of a pair of a tree extraction function and a debugged parser. */
Expand Down
23 changes: 18 additions & 5 deletions parsley/shared/src/main/scala/parsley/debug/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,29 @@ import parsley.internal.deepembedding.frontend
* These are the debugging combinators, which are enabled by bringing these implicit classes
* into scope. These are part of base parsley.
*
* @groupprio debugcomb 2
* @groupname debugcomb (parsley-debug) Debug Combinators
* @groupdesc debugcomb
* These are additional debug combinators added by `parsley-debug`,
* which allow the attachment of a debug-view, or otherwise use of specialist
* debuggers like `detectDivergence`.
*
* @groupprio debugview 4
* @groupname debugview (parsley-debug) Debug Views
* @groupdesc debugview
* These are implementations of renderers for debug traces for `parsley-debug`.
*
* @groupprio ctrl 5
* @groupname ctrl (Vanilla) Debug Control
* @groupdesc ctrl
* These methods can control how the debug mechanism functions in a general way.
*
* @groupprio break 10
* @groupname break Breakpoints
* @groupname break (Vanilla) Breakpoints
* @groupdesc break
* These can be used to control how the `debug` combinator operates: when a breakpoint is used
* it can halt the execution of the combinator and print out information about the parsers state.
*
* @groupprio ctrl 5
* @groupname ctrl Debug Control
* @groupdesc ctrl
* These methods can control how the debug mechanism functions in a general way.
*/
package object debug {
// $COVERAGE-OFF$
Expand Down

0 comments on commit c579797

Please sign in to comment.