token

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: Apache-2.0, MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pos

type Pos struct {
	Offset int
	Line   int
	Column int
}

func (Pos) String

func (p Pos) String() string

type Token

type Token struct {
	Type
	Lit []byte
	Pos
}

func (*Token) String

func (t *Token) String() string

type Type

type Type int
const (
	INVALID Type = iota
	EOF
	LONGSTRING
	NUMDEC
	STRING
	NUMHEX
	IDENT

	KwBreak
	KwGoto
	KwDo
	KwWhile
	KwEnd
	KwRepeat
	KwUntil
	KwThen
	KwElse
	KwElseIf
	KwIf
	KwFor
	KwIn
	KwFunction
	KwLocal
	KwNot
	KwNil
	KwTrue
	KwFalse
	KwReturn

	SgEtc

	SgOpenSquareBkt
	SgCloseSquareBkt
	SgOpenBkt
	SgCloseBkt
	SgOpenBrace
	SgCloseBrace
	SgSemicolon
	SgComma
	SgDot
	SgColon
	SgDoubleColon
	SgAssign
	SgHash

	SgMinus
	SgPlus
	SgStar
	SgSlash
	SgSlashSlash
	SgPct
	SgPipe
	SgTilde
	SgAmpersand
	SgHat
	SgShiftRight
	SgShiftLeft
	SgEqual
	SgNotEqual
	SgLess
	SgLessEqual
	SgGreater
	SgGreaterEqual
	SgConcat
	KwAnd
	KwOr
)

func (Type) IsBinOp

func (tp Type) IsBinOp() bool

Jump to

Keyboard shortcuts

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