token

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: MPL-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Copyright 2024 Blake Felt blake.w.felt@gmail.com

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Type

type Type int
const (
	Semicolon    Type = iota // token for ;
	Colon                    // token for :
	Ampersand                // token for &
	Equal                    // token for =
	LeftParen                // token for (
	RightParen               // token for )
	LeftBrace                // token for {
	RightBrace               // token for }
	LeftBracket              // token for [
	RightBracket             // token for ]
	At                       // token for @
	Pound                    // token for #
	Comma                    // token for ,

	Goto // token for "goto"
	If   // token for "if"
	IfEq // token for low level "ifEq"
	IfOv // token for low level "ifOv"

	Plus  // token for + operator
	Minus // token for - operator
	Or    // token for | operator
	Lsh   // token for << operator
	Rsh   // token for >> operator

	EqualEqual   // token for ==
	NotEqual     // token for !=
	Greater      // token for >
	Less         // token for <
	GreaterEqual // token for >=
	LessEqual    // token for <=

	Var       // token for variable definition
	VarSet    // token for variable definition with initial values set
	Func      // token for function definition
	Static    // token for static global variable modifier
	Extern    // token for extern modifier
	Attribute // token for function __attribute__ list

	RegWr // token for reg_wr instruction
	RegRd // token for reg_rd instruction
	Wait  // token for wait instruction
	I2cWr // token for i2c_wr instruction
	I2cRd // token for i2c_rd instruction
	Halt  // token for halt instruction
	Wake  // token for wake instruction
	Sleep // token for sleep instruction
	Adc   // token for adc instruction

	// literals
	Identifier
	Number
	String // token for a string

	EndOfFile
	Unknown
)

func ToType

func ToType(str string) Type

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