token

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Token

type Token struct {
	Value     string
	StartLine int
	EndLine   int
	StartPos  int
	EndPos    int
	// contains filtered or unexported fields
}

Token value returned by lexer

func NewToken

func NewToken(value []byte, startLine int, endLine int, startPos int, endPos int) Token

NewToken Token constructor TODO: return pointer

func (Token) Comments

func (t Token) Comments() []comment.Comment

Comments returns attached comments

func (Token) SetComments

func (t Token) SetComments(comments []comment.Comment) Token

SetComments attach comments

func (Token) String

func (t Token) String() string

Jump to

Keyboard shortcuts

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