token

package
v0.1.3-beta Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2016 License: Apache-2.0 Imports: 1 Imported by: 9 modules, 21 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsKeyword

func IsKeyword(t Token) bool

Types

type FileInfo

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

func NewFileInfo

func NewFileInfo(l, c int) FileInfo

func (FileInfo) Column

func (info FileInfo) Column() int

func (FileInfo) Line

func (info FileInfo) Line() int

type Token

type Token int
const (
	Illegal Token = iota + 1 // error ocurred
	EOF
	Comment

	Ident
	String // "<string>"
	Number // [0-9]+
	Arg

	Assign    // =
	AssignCmd // <=
	Equal     // ==
	NotEqual  // !=
	Plus      // +
	Minus     // -
	Gt        // >
	Lt        // <

	Colon     // ,
	Semicolon // ;

	LBrace // {
	RBrace // }
	LParen // (
	RParen // )
	LBrack // [
	RBrack // ]
	Pipe

	Comma

	Variable

	Import
	SetEnv
	ShowEnv
	BindFn // "bindfn <fn> <cmd>
	Dump   // "dump" [ file ]
	Return
	If
	Else
	For
	Rfork
	Fn
)

func Lookup

func Lookup(ident string) Token

func (Token) String

func (tok Token) String() string

Jump to

Keyboard shortcuts

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