parser

package
v0.0.0-...-81022b6 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const COLON = 57355
View Source
const CR = 57349
View Source
const EOF = -1
View Source
const GT = 57353
View Source
const HEADING_MARKER = 57354
View Source
const LBRACKET = 57350
View Source
const LT = 57352
View Source
const NEW_LINE = '\n'
View Source
const ORDERED_LIST_MARKER = 57348
View Source
const RBRACKET = 57351
View Source
const TEXT = 57346
View Source
const UNORDERED_LIST_MARKER = 57347

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block interface{}

type Document

type Document struct {
	Nodes []Block
}

func Parse

func Parse(src io.Reader) (*Document, error)

func (*Document) MarshalJSON

func (doc *Document) MarshalJSON() ([]byte, error)

type Heading

type Heading struct {
	Level   int
	Content []Inline
}

func (Heading) MarshalJSON

func (h Heading) MarshalJSON() ([]byte, error)

type HttpOptions

type HttpOptions []string

type Inline

type Inline interface{}

type InlineHttp

type InlineHttp struct {
	Reference Reference
}

func (InlineHttp) MarshalJSON

func (ih InlineHttp) MarshalJSON() ([]byte, error)

type InlineText

type InlineText struct {
	Literal string
}

func (InlineText) MarshalJSON

func (it InlineText) MarshalJSON() ([]byte, error)

type Lexer

type Lexer struct {
	scanner.Scanner
	// contains filtered or unexported fields
}

func NewLexer

func NewLexer(in io.Reader) *Lexer

func (*Lexer) Error

func (l *Lexer) Error(e string)

func (*Lexer) Lex

func (l *Lexer) Lex(lval *yySymType) int

type Line

type Line struct {
	Inlines []Inline
}

func (Line) MarshalJSON

func (l Line) MarshalJSON() ([]byte, error)

type OrderedList

type OrderedList struct {
	Items []OrderedListItem
}

type OrderedListItem

type OrderedListItem struct {
	Inlines []Inline
}

type ParseError

type ParseError struct {
	Message string
	Line    int
	Column  int
}

func (*ParseError) Error

func (e *ParseError) Error() string

type Quotation

type Quotation struct {
	Cite    Reference
	Content []Block
}

func (Quotation) MarshalJSON

func (q Quotation) MarshalJSON() ([]byte, error)

type Reference

type Reference struct {
	Url     string
	Options HttpOptions
}

func (Reference) MarshalJSON

func (ref Reference) MarshalJSON() ([]byte, error)

type Token

type Token struct {
	// contains filtered or unexported fields
}

func (Token) Name

func (t Token) Name() string

type UnorderedList

type UnorderedList struct {
	Items []UnorderedListItem
}

func (UnorderedList) MarshalJSON

func (ul UnorderedList) MarshalJSON() ([]byte, error)

type UnorderedListItem

type UnorderedListItem struct {
	Depth   int
	Inlines []Inline
}

func (UnorderedListItem) MarshalJSON

func (uli UnorderedListItem) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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