parser

package
v0.0.0-...-74d770d Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2015 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNormalised

func GetNormalised(l string, t Token) string

func Parse

func Parse(t string, r io.Reader) (*model.TodoList, error)

func Write

func Write(l *model.TodoList, wr io.Writer) error

Types

type ParseError

type ParseError struct {
	Message string
}

func NewParseError

func NewParseError(msg string) *ParseError

func (*ParseError) Error

func (p *ParseError) Error() string

type Parser

type Parser struct {
	Debug bool
}

func NewParser

func NewParser() *Parser

func (*Parser) Parse

func (p *Parser) Parse(t string, r io.Reader) (*model.TodoList, error)

type Token

type Token int
const (
	TOK_NONE Token = iota
	TOK_GROUP
	TOK_ITEM
	TOK_ITEM_DONE
	TOK_ITEM_DESC
)

func GetToken

func GetToken(l string, prev Token) Token

func (Token) String

func (t Token) String() string

type Writer

type Writer struct{}

func NewWriter

func NewWriter() *Writer

func (*Writer) Write

func (w *Writer) Write(l *model.TodoList, wr io.Writer) error

Jump to

Keyboard shortcuts

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