tokens

package
v0.0.0-...-d401e3c Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TokenType

type TokenType int

TokenType represents the type of the token

const (
	Unkown TokenType = iota

	Namespace TokenType = iota + 10
	Use
	As
	From

	Let TokenType = iota + 100
	Const
	Define
	Return
	New
	This // Reference for blocks
	Identifier
	FuncCall
	EmptyReturn
	For
	While

	Number TokenType = iota + 1000
	String
	Bool
	Nil
	Function
	FuncArg
	Definiton

	Addition TokenType = iota + 10000
	Subtraction
	Multiplication
	Power
	Division
	Modulo
	Increment
	Decrement
	Assign
	Equation
	NotEquation
	Greater
	Less
	GreaterOrEqual
	LessOrEqual
	And
	Or
	Not

	LeftParenthesis TokenType = iota + 100000
	RightParenthesis
	LeftBrace
	RightBrace
	LeftBracket
	RightBracket

	Comma TokenType = iota + 1000000
	Dot
	Semicolon
	Colon
	At

	If TokenType = iota + 10000000
	Then
	ElseIf
	Else

	NewLine TokenType = iota + 100000000
	SingleLineComment
	MultiLineComment
	WhiteSpace
)

func (TokenType) IsOperator

func (t TokenType) IsOperator() bool

func (TokenType) String

func (t TokenType) String() string

func (TokenType) ToVariableType

func (t TokenType) ToVariableType() VariableType

type VariableType

type VariableType int

VariableType represents the type of the variable

const (
	NilVariable VariableType = iota
	IntVariable
	FloatVariable
	StringVariable
	BoolVariable
	FunctionCallVariable
	ExpressionVariable
	ReferenceVariable
	InlineValue
	DefinitionBlock
	DefinitionReference
	EmptyReturnValue
)

func (VariableType) String

func (v VariableType) String() string

Jump to

Keyboard shortcuts

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