JsonFormatter

parsley.debug.JsonFormatter
See theJsonFormatter companion object
sealed class JsonFormatter extends Reusable

A frontend that emits a JSON-format string representing the parse tree.

Unlike most other frontends, this frontend will call a continuation that will have the JSON value passed into after it has been produced by traversing the tree.

This continuation must return unit, as there are not many other ways to make it useful other than making this impure. It is recommended that if one wants to extract multiple inputs from the same frontend with the same continuation, that it is recorded to some kind of list or iterable structure.

It is recommended that all memory-heavy types (e.g. closures) are not stored explicitly. Consult the documentation on attaching debuggers to find out how to prevent that.

Attributes

Companion
object
Source
JsonFormatter.scala
Graph
Supertypes
trait Reusable
trait DebugView
class Object
trait Matchable
class Any
Known subtypes
In this article