sexpr

package
v0.0.0-...-7d39c61 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

README

sexpr

Sexpr is the renderer used to test yawip parsers. It transforms the syntax tree produced by the parsers into something that is sort of kind of like an S-Expression. The output is not intended to be pretty, but it is easy to compare against for testing.

Example

Given the following AsciiDoc as input:

= Hello, World! : A wry commentary
Doc Writer <doc@example.com>

Then sexpr will output:

(Document
(DocumentHeader
    (SectionLevel0 "Hello, World! : A wry commentary")
    (AuthorLine "Doc Writer <doc@example.com>")))

Documentation

Overview

Package sexpr renders a syntax tree into something like an S-Expression.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Renderer

type Renderer struct{}

Renderer is

func New

func New() *Renderer

New returns a new renderer

func (*Renderer) Render

func (r *Renderer) Render(a *syntax.Tree) ([]byte, error)

Render renders a syntax tree into something like an S-Expression

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL