tokenizer

package
v0.0.0-...-2520a80 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2014 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLineStarters

func GetLineStarters() []string

func New

func New(s *string, options optargs.MapType, indent_string string) *tokenizer

func NewAcorn

func NewAcorn() *acorn

Types

type Token

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

func NewSimpleToken

func NewSimpleToken(text string, tktype string, n_newlines int, whitespace_before_token string) Token

func (*Token) CommentsBefore

func (self *Token) CommentsBefore() []Token

func (*Token) NewLines

func (self *Token) NewLines() int

func (*Token) Print

func (self *Token) Print()

func (*Token) SetType

func (self *Token) SetType(tktype string)

func (*Token) Text

func (self *Token) Text() string

func (*Token) Type

func (self *Token) Type() string

func (*Token) WantedNewLine

func (self *Token) WantedNewLine() bool

func (*Token) WhitespaceBefore

func (self *Token) WhitespaceBefore() string

type TokenStack

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

func (*TokenStack) Append

func (self *TokenStack) Append(t Token)

func (*TokenStack) Empty

func (self *TokenStack) Empty() bool

func (*TokenStack) Pop

func (self *TokenStack) Pop() *Token

func (*TokenStack) Shift

func (self *TokenStack) Shift() *Token

Jump to

Keyboard shortcuts

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