mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 08:47:28 +01:00
Remove status values
This commit is contained in:
1 parent
44e99d79cf
commit
203b45e869
13 files changed
+61
-146
No files matched your search
+1
-6
@@ -846,7 +846,6 @@ func NewFunc(flags Flags, filename string, line uint32, receiverName t.ID, funcN
|
||||
|
||||
// Status is "error (RHS) ID2" or "suspension (RHS) ID2":
|
||||
// - FlagsPublic is "pub" vs "pri"
|
||||
// - ID0: <IDError|IDSuspension>
|
||||
// - ID1: <0|pkg> (set by calling SetPackage)
|
||||
// - ID2: message
|
||||
type Status Node
|
||||
@@ -855,19 +854,15 @@ func (n *Status) AsNode() *Node { return (*Node)(n) }
|
||||
func (n *Status) Public() bool { return n.flags&FlagsPublic != 0 }
|
||||
func (n *Status) Filename() string { return n.filename }
|
||||
func (n *Status) Line() uint32 { return n.line }
|
||||
func (n *Status) Keyword() t.ID { return n.id0 }
|
||||
func (n *Status) QID() t.QID { return t.QID{n.id1, n.id2} }
|
||||
func (n *Status) Value() *Expr { return n.rhs.AsExpr() }
|
||||
|
||||
func NewStatus(flags Flags, filename string, line uint32, keyword t.ID, value *Expr, message t.ID) *Status {
|
||||
func NewStatus(flags Flags, filename string, line uint32, message t.ID) *Status {
|
||||
return &Status{
|
||||
kind: KStatus,
|
||||
flags: flags,
|
||||
filename: filename,
|
||||
line: line,
|
||||
id0: keyword,
|
||||
id2: message,
|
||||
rhs: value.AsNode(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user