mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-21 16:47:28 +01:00
Add Token.KeyFoo constants.
This commit is contained in:
1 parent
05a217e8a3
commit
90c5f4758e
8 files changed
+483
-358
No files matched your search
+5
-3
@@ -378,9 +378,11 @@ const MaxTypeExprDepth = 63
|
||||
// example, the MHS for "u32[:4096]" is nil.
|
||||
type TypeExpr Node
|
||||
|
||||
func (n *TypeExpr) Node() *Node { return (*Node)(n) }
|
||||
func (n *TypeExpr) IsNumType() bool { return n.id0 == 0 && n.id1.IsNumType() }
|
||||
func (n *TypeExpr) IsRefined() bool { return n.id0 != t.IDOpenBracket && (n.lhs != nil || n.mhs != nil) }
|
||||
func (n *TypeExpr) Node() *Node { return (*Node)(n) }
|
||||
func (n *TypeExpr) IsNumType() bool { return n.id0 == 0 && n.id1.IsNumType() }
|
||||
func (n *TypeExpr) IsRefined() bool {
|
||||
return t.Key(n.id0>>t.KeyShift) != t.KeyOpenBracket && (n.lhs != nil || n.mhs != nil)
|
||||
}
|
||||
func (n *TypeExpr) PackageOrDecorator() t.ID { return n.id0 }
|
||||
func (n *TypeExpr) Name() t.ID { return n.id1 }
|
||||
func (n *TypeExpr) ArrayLength() *Expr { return n.lhs.Expr() }
|
||||
|
||||
Reference in new issue
Block a user