Create and initialize Highlighter in TextEdit

This commit is contained in:
Luke I. Wilson
2021-03-27 13:42:11 -05:00
parent 1161888660
commit 9a85e8efef
6 changed files with 191 additions and 4 deletions

23
ui/buffer/language.go Executable file
View File

@ -0,0 +1,23 @@
package buffer
import "regexp"
type Syntax uint8
const (
Default Syntax = iota
Keyword
Special
Type
Number
Builtin
Comment
DocComment
)
type Language struct {
Name string
Filetypes []string // .go, .c, etc.
Rules map[*regexp.Regexp]Syntax
// TODO: add other language details
}