token

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Error

type Error struct {
	Pos Position
	Err error
}

func (Error) Error

func (e Error) Error() string

type Errors

type Errors []error

func (Errors) Error

func (errs Errors) Error() string

func (Errors) Sort

func (errs Errors) Sort()

type Position

type Position = ast.Position

type Type

type Type int
const (
	INVALID Type = iota

	// Keywords - keep up to date with AllKeywords below
	NAMESPACE
	ENTITY
	ACTION
	TYPE
	IN
	TAGS
	APPLIESTO
	PRINCIPAL
	RESOURCE
	CONTEXT
	ENUM

	// Punctuation
	LEFTBRACE    // {
	RIGHTBRACE   // }
	LEFTBRACKET  // [
	RIGHTBRACKET // ]
	LEFTANGLE    // <
	RIGHTANGLE   // >
	COLON        // :
	SEMICOLON    // ;
	COMMA        // ,
	EQUALS       // =
	QUESTION     // ?
	DOUBLECOLON  // ::
	AT           // @
	LEFTPAREN    // (
	RIGHTPAREN   // )

	// Identifiers and literals
	IDENT  // Regular identifier
	STRING // String literal, quoted with ""

	// Comments
	COMMENT // // style comment

	// Special
	EOF // End of file
)

func (Type) String

func (tok Type) String() string

Jump to

Keyboard shortcuts

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