token

package
v0.0.0-...-ba3f13d Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ILLEGAL = "ILLEGAL"
	EOF     = "EOF"

	// Symbols  + literals
	SYMBOL = "SYMBOL"
	INT    = "INT"

	// Special Form
	LAMBDA = "LAMBDA"
	QUOTE  = "'"
	IF     = "IF"
	SETQ   = "SETQ"

	PLUS  = "+"
	MINUS = "-"

	DOT       = "."
	BACKQUOTE = "`"
	COMMA     = ","

	// Delimiters
	LPAREN = "("
	RPAREN = ")"

	// Keywords
	NIL  = "nil"
	TRUE = "t"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Token

type Token struct {
	Type    TokenType
	Literal string
}

type TokenType

type TokenType string

func LookupKeyword

func LookupKeyword(symbol string) TokenType

Jump to

Keyboard shortcuts

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