syntax

package
v0.0.0-...-8454ee1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HlNormal uint8 = iota
	HlComment
	HlMlComment
	HlKeyword1
	HlKeyword2
	HlString
	HlNumber
	HlMatch
)
View Source
const (
	HL_HIGHLIGHT_NUMBERS = 1 << iota
	HL_HIGHLIGHT_STRINGS
)

Variables

View Source
var HLDB = []*EditorSyntax{
	syntaxGo, syntaxLua, syntaxPython,
}

Functions

func SyntaxToColor

func SyntaxToColor(hl uint8) string

Types

type EditorSyntax

type EditorSyntax struct {
	Filetype  string
	Filematch []string
	Keywords  []string
	// single line comment section
	Scs string
	// multi line comment start pattern
	Mcs string
	// multi line comment end pattern
	Mce string
	// Bit field that contains Flags for whether to highlight numbers and
	// whether to highlight strings.
	Flags int
	// \t representation based of file syntax
	Tabstop int
}

Jump to

Keyboard shortcuts

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