DebugFrontend

parsley.debugger.frontend.DebugFrontend
sealed trait DebugFrontend

A common interface for a debug frontend for a debugger to present the debug tree. Inherit from one of the two provided subtraits to use.

Any compliant implementation that handles all nodes of a parsley.debugger.DebugTree can be used in place of any other implementation (e.g. a serialiser to JSON, a GUI, etc.).

If a frontend is reusable, one can implement it as either an object or a class, but an object is recommended. Either way, it should inherit ReusableFrontend.

If a frontend is single-use (e.g. it has some non-reusable state), never implement it as an object. Always implement single-use frontends as a class of some sort inheriting from SingleUseFrontend.

If the results of some processing of a tree are needed out of a frontend, create a frontend class that accepts some continuation parameter of ReturnType => Unit and call it somewhere within the implementation.

Attributes

Since

4.5.0

Source
DebugFrontend.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

protected def processImpl(input: => String, tree: => DebugTree): Unit

The actual method that does the processing of the tree.

The actual method that does the processing of the tree. Override this to process a tree in a custom way.

Attributes

Source
DebugFrontend.scala

Concrete methods

final def process(input: => String, tree: => DebugTree): Unit

Process a debug tree using whatever the frontend is doing to present the tree in some way.

Process a debug tree using whatever the frontend is doing to present the tree in some way.

Value parameters

input

The full input of the parse.

tree

Debug tree to process.

Attributes

Source
DebugFrontend.scala