kolonish

package
v0.0.0-...-baef74e Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2018 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

View Source
const (
	ItemDollar lex.ItemType = parser.DefaultItemTypeMax + 1
)

Variables

View Source
var SymbolSet = parser.DefaultSymbolSet.Copy()

Functions

func NewLexer

func NewLexer(template string) *parser.Lexer

func NewReaderLexer

func NewReaderLexer(rdr io.Reader) *parser.Lexer

NewReaderLexer creates a new lexer

func NewStringLexer

func NewStringLexer(template string) *parser.Lexer

NewStringLexer creates a new lexer

Types

type Kolonish

type Kolonish struct{}

Kolonish is the main parser for Kolonish

func New

func New() *Kolonish

New creates a new Kolonish parser

func (*Kolonish) Parse

func (p *Kolonish) Parse(name string, template []byte) (*parser.AST, error)

Parse parses the given template and creates an AST

func (*Kolonish) ParseReader

func (p *Kolonish) ParseReader(name string, rdr io.Reader) (*parser.AST, error)

ParseReader gets the template content from an io.Reader type

func (*Kolonish) ParseString

func (p *Kolonish) ParseString(name, template string) (*parser.AST, error)

ParseString is the same as Parse, but receives a string instead of []byte

Jump to

Keyboard shortcuts

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