tterse

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: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

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

SymbolSet contains TTerse specific symbols

Functions

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 TTerse

type TTerse struct{}

TTerse is the main parser for TTerse

func New

func New() *TTerse

New creates a new TTerse parser

func (*TTerse) Parse

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

Parse parses the given template and creates an AST

func (*TTerse) ParseReader

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

ParseReader gets the template content from an io.Reader type

func (*TTerse) ParseString

func (p *TTerse) 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