types

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KEYWORDS []string = []string{
		"break ", "default ", "func ", "interface", "select",
		"case", "defer", "go", "map", "struct", "func", "main",
		"chan", "else", "goto", "package", "switch", "init",
		"const", "fallthrough", "if", "range", "type", "len",
		"continue", "for", "import", "return", "var", "make",
		"panic", "false", "true", "print",
	}

	TYPES []string = []string{
		"bool", "string", "int", "int8", "int16", "int32",
		"int64", "uint", "uint8", "uint16", "uint32", "uint64",
		"uintptr", "float32", "float64", "complex64", "complex128",
		"byte", "rune", "nil",
	}

	LIBRARIES []string = []string{
		"fmt", "os", "log", "net", "filepath", "ftp",
	}

	SUPPORTED_LANGS []string = []string{
		"go",
	}
)

Functions

func GetTokenName

func GetTokenName(tk TokenKind) string

Types

type Token

type Token struct {
	Kind TokenKind
	Addr Vec2i
	Len  int
}

type TokenKind

type TokenKind uint8

TEMPORARILY FOR GO ONLY

const (
	TOKEN_INVALID TokenKind = iota
	TOKEN_PREPROC
	TOKEN_SYMBOL
	TOKEN_KEYWORD
	TOKEN_TYPE
	TOKEN_LIB
	TOKEN_IMPORTED
	TOKEN_COMMENT
	TOKEN_STRING
	TOKEN_TAB
	TOKEN_END
)

type Vec2i

type Vec2i struct {
	X, Line, Origin int
}

For Token position [inMain, col]

Jump to

Keyboard shortcuts

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