Rename errors from "?msg" to "#msg"

This commit is contained in:
Nigel Tao committed 2019-02-23 17:06:24 +11:00
1 parent c341ac5078
commit 045f180a6c
16 files changed
+203 -203

No files matched your search

+1 -1
View File
@@ -302,7 +302,7 @@ const MaxExprDepth = 255
// - List0: <Arg|Expr> function call args, assoc. op args or list members.
//
// A zero ID0 means an identifier or literal in ID2, like `foo`, `42` or a
// status literal like `"?foo"` or `pkg."$bar"`. For status literals, ID1 is
// status literal like `"#foo"` or `pkg."$bar"`. For status literals, ID1 is
// the package.
//
// For unary operators, ID0 is the operator and RHS is the operand.
+15 -15
View File
@@ -28,21 +28,21 @@ var Statuses = [...]string{
`"$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"`,
`"?disabled by previous error"`,
`"?initialize falsely claimed already zeroed"`,
`"?initialize not called"`,
`"?interleaved coroutine calls"`,
`"?not enough data"`,
`"?too much data"`,
`"#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"`,
`"#disabled by previous error"`,
`"#initialize falsely claimed already zeroed"`,
`"#initialize not called"`,
`"#interleaved coroutine calls"`,
`"#not enough data"`,
`"#too much data"`,
}
// TODO: a collection of forbidden variable names like and, or, not, as, ref,
+1 -1
View File
@@ -79,7 +79,7 @@ func init() {
func isErrorStatus(literal t.ID, tm *t.Map) bool {
s := literal.Str(tm)
return (len(s) >= 2) && (s[0] == '"') && (s[1] == '?')
return (len(s) >= 2) && (s[0] == '"') && (s[1] == '#')
}
func btoi(b bool) *big.Int {