Quote built-in statuses

This commit is contained in:
Nigel Tao committed 2018-11-24 13:42:18 +11:00
1 parent 9e5aec5d25
commit c84732f3d3
3 files changed
+34 -25

No files matched your search

+15 -15
View File
@@ -21,25 +21,25 @@ import (
var Statuses = [...]string{
// Warnings.
"~end of data",
`"~end of data"`,
// Suspensions.
"$short read",
"$short write",
`"$short read"`,
`"$short write"`,
// Errors.
"?bad argument (length too short)",
"?bad argument",
"?bad call sequence",
"?bad receiver",
"?bad restart",
"?bad sizeof receiver",
"?bad workbuf length",
"?bad wuffs version",
"?cannot return a suspension",
"?check_wuffs_version not applicable",
"?check_wuffs_version missing",
"?disabled by previous error",
`"?bad argument (length too short)"`,
`"?bad argument"`,
`"?bad call sequence"`,
`"?bad receiver"`,
`"?bad restart"`,
`"?bad sizeof receiver"`,
`"?bad workbuf length"`,
`"?bad wuffs version"`,
`"?cannot return a suspension"`,
`"?check_wuffs_version not applicable"`,
`"?check_wuffs_version missing"`,
`"?disabled by previous error"`,
}
// TODO: a collection of forbidden variable names like and, or, not, as, ref,
+1 -1
View File
@@ -108,7 +108,7 @@ func Check(tm *t.Map, files []*a.File, resolveUse func(usePath string) ([]byte,
}
for _, z := range builtin.Statuses {
id, err := tm.Insert(`"` + z + `"`)
id, err := tm.Insert(z)
if err != nil {
return nil, err
}