aboutsummaryrefslogtreecommitdiff
path: root/driver/template.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2021-10-03 00:54:39 +0900
committerRyo Nihei <nihei.dev@gmail.com>2021-10-05 00:41:48 +0900
commit0b177a389a3beb2d27f43607b462b35ef7d652ce (patch)
treef345bddd6f43aa8e657f0eccddf2c06971884db1 /driver/template.go
parentRemove the ModeName and KindName fields from the driver.Token struct (diff)
downloadtre-0b177a389a3beb2d27f43607b462b35ef7d652ce.tar.gz
tre-0b177a389a3beb2d27f43607b462b35ef7d652ce.tar.xz
Update godoc
Diffstat (limited to 'driver/template.go')
-rw-r--r--driver/template.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/driver/template.go b/driver/template.go
index a3d2726..bafe718 100644
--- a/driver/template.go
+++ b/driver/template.go
@@ -71,6 +71,7 @@ func GenLexer(clspec *spec.CompiledLexSpec, pkgName string) ([]byte, error) {
{
var b strings.Builder
fmt.Fprintf(&b, `
+// ModeIDToName converts a mode ID to a name.
func ModeIDToName(id ModeID) string {
switch id {`)
for i, k := range clspec.ModeNames {
@@ -127,6 +128,7 @@ func ModeIDToName(id ModeID) string {
{
var b strings.Builder
fmt.Fprintf(&b, `
+// KindIDToName converts a kind ID to a name.
func KindIDToName(id KindID) string {
switch id {`)
for i, k := range clspec.KindNames {