token

package
v6.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2017 License: MIT Imports: 0 Imported by: ? modules, 0 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

View Source
const (
	EOF = iota // 0
	ILLEGAL

	// Identifiers + literals
	LBRACE // {
	RBRACE // }
	//	PARAM_IDENTIFIER // id
	COLON // :
	// let's take them in parser
	//	PARAM_TYPE       // int, string, alphabetical, file, path or unexpected
	//	PARAM_FUNC       // range
	LPAREN // (
	RPAREN // )
	//	PARAM_FUNC_ARG   // 1
	COMMA
	IDENT // string or keyword

	ELSE // else

	INT // 42

)

/about/{fullname:alphabetical} /profile/{anySpecialName:string} {id:int range(1,5) else 404} /admin/{id:int eq(1) else 402} /file/{filepath:file else 405}

Variables

This section is empty.

Functions

This section is empty.

Types

type Token

type Token struct {
	Type    TokenType
	Literal string
	Start   int // including the first char, Literal[index:]
	End     int // including the last char, Literal[start:end+1)
}

type TokenType

type TokenType int

func LookupIdent

func LookupIdent(ident string) TokenType

Jump to

Keyboard shortcuts

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