token

package
v0.0.0-...-1e7c8b3 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: GPL-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package token contains the token-types which our lexer produces, and which our parser understands.

Index

Constants

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

	// Our keywords.
	COPYFILE     = "CopyFile"
	COPYTEMPLATE = "CopyTemplate"
	DEPLOYTO     = "DeployTo"
	IFCHANGED    = "IfChanged"
	RUN          = "Run"
	SET          = "Set"
	SUDO         = "Sudo"
)

pre-defined TokenTypes

Variables

This section is empty.

Functions

This section is empty.

Types

type Token

type Token struct {
	Type    Type
	Literal string
}

Token struct represent the lexer token

type Type

type Type string

Type is a string

func LookupIdentifier

func LookupIdentifier(identifier string) Type

LookupIdentifier used to determinate whether identifier is keyword nor not

Jump to

Keyboard shortcuts

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