token

package
v0.0.0-...-8bbaf59 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Token

type Token struct {
	Type   Type
	Start  int
	Length int
	Line   int
	Lexeme string
}

type Type

type Type int
const (
	ILLEGAL Type = iota

	/*
	 * Operators
	 */
	EQUAL
	EQUAL_EQUAL
	BANG
	BANG_EQUAL

	PLUS
	MINUS
	STAR
	SLASH

	LESS
	MORE

	/*
	 * Delimiters
	 */
	COMMA
	DOT
	COLON
	SEMICOLON

	LPAREN
	RPAREN
	LBRACE
	RBRACE
	LBRACKET
	RBRACKET

	/*
	 * Identifiers + Literals
	 */
	STRING
	IDENT
	NUMBER

	/*
	 * Keywords
	 */
	FN
	IF
	LET
	ELSE
	TRUE
	FALSE
	MACRO
	RETURN

	EOF
)

func (Type) String

func (t Type) String() string

Jump to

Keyboard shortcuts

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