Files
memos/plugin/gomark/parser/tokenizer/token.go
boojack 88799d469c chore: initial gomark plugin (#1678)
chore: initial gomark folder
2023-05-18 21:33:18 +08:00

28 lines
366 B
Go

package tokenizer
type TokenType = string
const (
Underline TokenType = "_"
Star TokenType = "*"
Newline TokenType = "\n"
Hash TokenType = "#"
Space TokenType = " "
)
const (
Text TokenType = ""
)
type Token struct {
Type TokenType
Value string
}
func NewToken(tp, text string) *Token {
return &Token{
Type: tp,
Value: text,
}
}