mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-21 16:47:28 +01:00
Quote built-in statuses
This commit is contained in:
1 parent
9e5aec5d25
commit
c84732f3d3
3 files changed
+34
-25
No files matched your search
+15
-15
@@ -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
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user