token

package
v0.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2016 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsKeyword

func IsKeyword(t Token) bool

Types

type Pos

type Pos int

func (Pos) Position

func (p Pos) Position() Pos

token.Position returns the position of the node in file

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

Source Files

  • token.go

Jump to

Keyboard shortcuts

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