mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 00:55:11 +01:00
Remove packageid
This commit is contained in:
1 parent
82a19afd4a
commit
6236e7205f
14 files changed
+87
-209
No files matched your search
@@ -250,25 +250,9 @@ func (h *genHelper) genWuffs(dirname string, qualifiedFilenames []string) error
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
pkgIDNode := (*a.PackageID)(nil)
|
|
||||||
for _, f := range files {
|
|
||||||
for _, n := range f.TopLevelDecls() {
|
|
||||||
if n.Kind() == a.KPackageID {
|
|
||||||
pkgIDNode = n.AsPackageID()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if pkgIDNode == nil {
|
|
||||||
return fmt.Errorf("missing packageid declaration")
|
|
||||||
}
|
|
||||||
pkgIDStr, ok := t.Unescape(pkgIDNode.ID().Str(&h.tm))
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("invalid packageid declaration")
|
|
||||||
}
|
|
||||||
|
|
||||||
out := &bytes.Buffer{}
|
out := &bytes.Buffer{}
|
||||||
fmt.Fprintf(out, "// Code generated by running \"wuffs gen\". DO NOT EDIT.\n\n")
|
fmt.Fprintf(out, "// Code generated by running \"wuffs gen\". DO NOT EDIT.\n\n")
|
||||||
fmt.Fprintf(out, "packageid %q\n\n", pkgIDStr)
|
|
||||||
|
|
||||||
for _, f := range files {
|
for _, f := range files {
|
||||||
for _, n := range f.TopLevelDecls() {
|
for _, n := range f.TopLevelDecls() {
|
||||||
|
|||||||
@@ -36,8 +36,6 @@
|
|||||||
- Changed the string messages for built-in status codes.
|
- Changed the string messages for built-in status codes.
|
||||||
- Changed `error "foo"` to `status "?foo"`.
|
- Changed `error "foo"` to `status "?foo"`.
|
||||||
- Made the status type a `const char *`, not an `int32_t`.
|
- Made the status type a `const char *`, not an `int32_t`.
|
||||||
- Made a packageid declaration mandatory.
|
|
||||||
- Disallowed certain packageid's like `base` or `config`.
|
|
||||||
- Disallowed `__double_underscore` prefixed names.
|
- Disallowed `__double_underscore` prefixed names.
|
||||||
- Moved the base38 package from `lang/base38` to `lib/base38`.
|
- Moved the base38 package from `lang/base38` to `lib/base38`.
|
||||||
- Added a stand-alone `lib/interval` package.
|
- Added a stand-alone `lib/interval` package.
|
||||||
|
|||||||
+40
-62
@@ -47,7 +47,6 @@ const (
|
|||||||
KIf
|
KIf
|
||||||
KIterate
|
KIterate
|
||||||
KJump
|
KJump
|
||||||
KPackageID
|
|
||||||
KRet
|
KRet
|
||||||
KStatus
|
KStatus
|
||||||
KStruct
|
KStruct
|
||||||
@@ -67,26 +66,25 @@ func (k Kind) String() string {
|
|||||||
var kindStrings = [...]string{
|
var kindStrings = [...]string{
|
||||||
KInvalid: "KInvalid",
|
KInvalid: "KInvalid",
|
||||||
|
|
||||||
KArg: "KArg",
|
KArg: "KArg",
|
||||||
KAssert: "KAssert",
|
KAssert: "KAssert",
|
||||||
KAssign: "KAssign",
|
KAssign: "KAssign",
|
||||||
KConst: "KConst",
|
KConst: "KConst",
|
||||||
KExpr: "KExpr",
|
KExpr: "KExpr",
|
||||||
KField: "KField",
|
KField: "KField",
|
||||||
KFile: "KFile",
|
KFile: "KFile",
|
||||||
KFunc: "KFunc",
|
KFunc: "KFunc",
|
||||||
KIOBind: "KIOBind",
|
KIOBind: "KIOBind",
|
||||||
KIf: "KIf",
|
KIf: "KIf",
|
||||||
KIterate: "KIterate",
|
KIterate: "KIterate",
|
||||||
KJump: "KJump",
|
KJump: "KJump",
|
||||||
KPackageID: "KPackageID",
|
KRet: "KRet",
|
||||||
KRet: "KRet",
|
KStatus: "KStatus",
|
||||||
KStatus: "KStatus",
|
KStruct: "KStruct",
|
||||||
KStruct: "KStruct",
|
KTypeExpr: "KTypeExpr",
|
||||||
KTypeExpr: "KTypeExpr",
|
KUse: "KUse",
|
||||||
KUse: "KUse",
|
KVar: "KVar",
|
||||||
KVar: "KVar",
|
KWhile: "KWhile",
|
||||||
KWhile: "KWhile",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type Flags uint32
|
type Flags uint32
|
||||||
@@ -176,7 +174,6 @@ type Node struct {
|
|||||||
// If . . . If
|
// If . . . If
|
||||||
// Iterate unroll label length Iterate
|
// Iterate unroll label length Iterate
|
||||||
// Jump keyword label . Jump
|
// Jump keyword label . Jump
|
||||||
// PackageID . . lit(pkgID) PackageID
|
|
||||||
// Ret keyword . . Ret
|
// Ret keyword . . Ret
|
||||||
// Status keyword pkg lit(message) Status
|
// Status keyword pkg lit(message) Status
|
||||||
// Struct . pkg name Struct
|
// Struct . pkg name Struct
|
||||||
@@ -203,27 +200,26 @@ func (n *Node) MType() *TypeExpr { return n.mType }
|
|||||||
func (n *Node) SetMBounds(x Bounds) { n.mBounds = x }
|
func (n *Node) SetMBounds(x Bounds) { n.mBounds = x }
|
||||||
func (n *Node) SetMType(x *TypeExpr) { n.mType = x }
|
func (n *Node) SetMType(x *TypeExpr) { n.mType = x }
|
||||||
|
|
||||||
func (n *Node) AsArg() *Arg { return (*Arg)(n) }
|
func (n *Node) AsArg() *Arg { return (*Arg)(n) }
|
||||||
func (n *Node) AsAssert() *Assert { return (*Assert)(n) }
|
func (n *Node) AsAssert() *Assert { return (*Assert)(n) }
|
||||||
func (n *Node) AsAssign() *Assign { return (*Assign)(n) }
|
func (n *Node) AsAssign() *Assign { return (*Assign)(n) }
|
||||||
func (n *Node) AsConst() *Const { return (*Const)(n) }
|
func (n *Node) AsConst() *Const { return (*Const)(n) }
|
||||||
func (n *Node) AsExpr() *Expr { return (*Expr)(n) }
|
func (n *Node) AsExpr() *Expr { return (*Expr)(n) }
|
||||||
func (n *Node) AsField() *Field { return (*Field)(n) }
|
func (n *Node) AsField() *Field { return (*Field)(n) }
|
||||||
func (n *Node) AsFile() *File { return (*File)(n) }
|
func (n *Node) AsFile() *File { return (*File)(n) }
|
||||||
func (n *Node) AsFunc() *Func { return (*Func)(n) }
|
func (n *Node) AsFunc() *Func { return (*Func)(n) }
|
||||||
func (n *Node) AsIOBind() *IOBind { return (*IOBind)(n) }
|
func (n *Node) AsIOBind() *IOBind { return (*IOBind)(n) }
|
||||||
func (n *Node) AsIf() *If { return (*If)(n) }
|
func (n *Node) AsIf() *If { return (*If)(n) }
|
||||||
func (n *Node) AsIterate() *Iterate { return (*Iterate)(n) }
|
func (n *Node) AsIterate() *Iterate { return (*Iterate)(n) }
|
||||||
func (n *Node) AsJump() *Jump { return (*Jump)(n) }
|
func (n *Node) AsJump() *Jump { return (*Jump)(n) }
|
||||||
func (n *Node) AsPackageID() *PackageID { return (*PackageID)(n) }
|
func (n *Node) AsRaw() *Raw { return (*Raw)(n) }
|
||||||
func (n *Node) AsRaw() *Raw { return (*Raw)(n) }
|
func (n *Node) AsRet() *Ret { return (*Ret)(n) }
|
||||||
func (n *Node) AsRet() *Ret { return (*Ret)(n) }
|
func (n *Node) AsStatus() *Status { return (*Status)(n) }
|
||||||
func (n *Node) AsStatus() *Status { return (*Status)(n) }
|
func (n *Node) AsStruct() *Struct { return (*Struct)(n) }
|
||||||
func (n *Node) AsStruct() *Struct { return (*Struct)(n) }
|
func (n *Node) AsTypeExpr() *TypeExpr { return (*TypeExpr)(n) }
|
||||||
func (n *Node) AsTypeExpr() *TypeExpr { return (*TypeExpr)(n) }
|
func (n *Node) AsUse() *Use { return (*Use)(n) }
|
||||||
func (n *Node) AsUse() *Use { return (*Use)(n) }
|
func (n *Node) AsVar() *Var { return (*Var)(n) }
|
||||||
func (n *Node) AsVar() *Var { return (*Var)(n) }
|
func (n *Node) AsWhile() *While { return (*While)(n) }
|
||||||
func (n *Node) AsWhile() *While { return (*While)(n) }
|
|
||||||
|
|
||||||
func (n *Node) Walk(f func(*Node) error) error {
|
func (n *Node) Walk(f func(*Node) error) error {
|
||||||
if n != nil {
|
if n != nil {
|
||||||
@@ -921,24 +917,6 @@ func NewStruct(flags Flags, filename string, line uint32, name t.ID, fields []*N
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// PackageID is "packageid ID2":
|
|
||||||
// - ID2: <string literal> package ID
|
|
||||||
type PackageID Node
|
|
||||||
|
|
||||||
func (n *PackageID) AsNode() *Node { return (*Node)(n) }
|
|
||||||
func (n *PackageID) Filename() string { return n.filename }
|
|
||||||
func (n *PackageID) Line() uint32 { return n.line }
|
|
||||||
func (n *PackageID) ID() t.ID { return n.id2 }
|
|
||||||
|
|
||||||
func NewPackageID(filename string, line uint32, id t.ID) *PackageID {
|
|
||||||
return &PackageID{
|
|
||||||
kind: KPackageID,
|
|
||||||
filename: filename,
|
|
||||||
line: line,
|
|
||||||
id2: id,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Use is "use ID2":
|
// Use is "use ID2":
|
||||||
// - ID2: <string literal> package path
|
// - ID2: <string literal> package path
|
||||||
type Use Node
|
type Use Node
|
||||||
@@ -958,7 +936,7 @@ func NewUse(filename string, line uint32, path t.ID) *Use {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// File is a file of source code:
|
// File is a file of source code:
|
||||||
// - List0: <Const|Func|PackageID|Status|Struct|Use> top-level declarations
|
// - List0: <Const|Func|Status|Struct|Use> top-level declarations
|
||||||
type File Node
|
type File Node
|
||||||
|
|
||||||
func (n *File) AsNode() *Node { return (*Node)(n) }
|
func (n *File) AsNode() *Node { return (*Node)(n) }
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ import (
|
|||||||
|
|
||||||
"github.com/google/wuffs/lang/builtin"
|
"github.com/google/wuffs/lang/builtin"
|
||||||
"github.com/google/wuffs/lang/parse"
|
"github.com/google/wuffs/lang/parse"
|
||||||
"github.com/google/wuffs/lib/base38"
|
|
||||||
|
|
||||||
a "github.com/google/wuffs/lang/ast"
|
a "github.com/google/wuffs/lang/ast"
|
||||||
t "github.com/google/wuffs/lang/token"
|
t "github.com/google/wuffs/lang/token"
|
||||||
@@ -87,7 +86,6 @@ func Check(tm *t.Map, files []*a.File, resolveUse func(usePath string) ([]byte,
|
|||||||
tm: tm,
|
tm: tm,
|
||||||
resolveUse: resolveUse,
|
resolveUse: resolveUse,
|
||||||
reasonMap: rMap,
|
reasonMap: rMap,
|
||||||
packageID: base38.Max + 1,
|
|
||||||
consts: map[t.QID]*a.Const{},
|
consts: map[t.QID]*a.Const{},
|
||||||
funcs: map[t.QQID]*a.Func{},
|
funcs: map[t.QQID]*a.Func{},
|
||||||
localVars: map[t.QQID]typeMap{},
|
localVars: map[t.QQID]typeMap{},
|
||||||
@@ -136,8 +134,6 @@ var phases = [...]struct {
|
|||||||
kind a.Kind
|
kind a.Kind
|
||||||
check func(*Checker, *a.Node) error
|
check func(*Checker, *a.Node) error
|
||||||
}{
|
}{
|
||||||
{a.KPackageID, (*Checker).checkPackageID},
|
|
||||||
{a.KInvalid, (*Checker).checkPackageIDExists},
|
|
||||||
{a.KUse, (*Checker).checkUse},
|
{a.KUse, (*Checker).checkUse},
|
||||||
{a.KStatus, (*Checker).checkStatus},
|
{a.KStatus, (*Checker).checkStatus},
|
||||||
{a.KConst, (*Checker).checkConst},
|
{a.KConst, (*Checker).checkConst},
|
||||||
@@ -161,9 +157,6 @@ type Checker struct {
|
|||||||
resolveUse func(usePath string) ([]byte, error)
|
resolveUse func(usePath string) ([]byte, error)
|
||||||
reasonMap reasonMap
|
reasonMap reasonMap
|
||||||
|
|
||||||
packageID uint32
|
|
||||||
otherPackageID *a.PackageID
|
|
||||||
|
|
||||||
consts map[t.QID]*a.Const
|
consts map[t.QID]*a.Const
|
||||||
funcs map[t.QQID]*a.Func
|
funcs map[t.QQID]*a.Func
|
||||||
localVars map[t.QQID]typeMap
|
localVars map[t.QQID]typeMap
|
||||||
@@ -179,49 +172,6 @@ type Checker struct {
|
|||||||
unsortedStructs []*a.Struct
|
unsortedStructs []*a.Struct
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Checker) PackageID() uint32 { return c.packageID }
|
|
||||||
|
|
||||||
func (c *Checker) checkPackageID(node *a.Node) error {
|
|
||||||
n := node.AsPackageID()
|
|
||||||
if c.otherPackageID != nil {
|
|
||||||
return &Error{
|
|
||||||
Err: fmt.Errorf("check: multiple packageid declarations"),
|
|
||||||
Filename: n.Filename(),
|
|
||||||
Line: n.Line(),
|
|
||||||
OtherFilename: c.otherPackageID.Filename(),
|
|
||||||
OtherLine: c.otherPackageID.Line(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
raw := n.ID().Str(c.tm)
|
|
||||||
s, ok := t.Unescape(raw)
|
|
||||||
if !ok {
|
|
||||||
return &Error{
|
|
||||||
Err: fmt.Errorf("check: %q is not a valid packageid", raw),
|
|
||||||
Filename: n.Filename(),
|
|
||||||
Line: n.Line(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
u, ok := base38.Encode(s)
|
|
||||||
if !ok || u == 0 {
|
|
||||||
return &Error{
|
|
||||||
Err: fmt.Errorf("check: %q is not a valid packageid", s),
|
|
||||||
Filename: n.Filename(),
|
|
||||||
Line: n.Line(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
c.packageID = u
|
|
||||||
c.otherPackageID = n
|
|
||||||
setPlaceholderMBoundsMType(n.AsNode())
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *Checker) checkPackageIDExists(node *a.Node) error {
|
|
||||||
if c.otherPackageID == nil {
|
|
||||||
return fmt.Errorf("check: missing packageid declaration")
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *Checker) checkUse(node *a.Node) error {
|
func (c *Checker) checkUse(node *a.Node) error {
|
||||||
usePath := node.AsUse().Path()
|
usePath := node.AsUse().Path()
|
||||||
filename, ok := t.Unescape(usePath.Str(c.tm))
|
filename, ok := t.Unescape(usePath.Str(c.tm))
|
||||||
|
|||||||
@@ -59,8 +59,6 @@ func compareToWuffsfmt(tm *t.Map, tokens []t.Token, comments []string, src strin
|
|||||||
func TestCheck(tt *testing.T) {
|
func TestCheck(tt *testing.T) {
|
||||||
const filename = "test.wuffs"
|
const filename = "test.wuffs"
|
||||||
src := strings.TrimSpace(`
|
src := strings.TrimSpace(`
|
||||||
packageid "test"
|
|
||||||
|
|
||||||
pri struct foo(
|
pri struct foo(
|
||||||
i base.i32,
|
i base.i32,
|
||||||
)
|
)
|
||||||
@@ -205,7 +203,7 @@ func TestConstValues(tt *testing.T) {
|
|||||||
|
|
||||||
tm := &t.Map{}
|
tm := &t.Map{}
|
||||||
for s, wantInt64 := range testCases {
|
for s, wantInt64 := range testCases {
|
||||||
src := "packageid \"test\"\npri func foo() {\n\t" + s + "\n}\n"
|
src := "pri func foo() {\n\t" + s + "\n}\n"
|
||||||
|
|
||||||
tokens, _, err := t.Tokenize(tm, filename, []byte(src))
|
tokens, _, err := t.Tokenize(tm, filename, []byte(src))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
+2
-16
@@ -19,8 +19,6 @@ package parse
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/google/wuffs/lib/base38"
|
|
||||||
|
|
||||||
a "github.com/google/wuffs/lang/ast"
|
a "github.com/google/wuffs/lang/ast"
|
||||||
t "github.com/google/wuffs/lang/token"
|
t "github.com/google/wuffs/lang/token"
|
||||||
)
|
)
|
||||||
@@ -102,7 +100,7 @@ func (p *parser) parseTopLevelDecl() (*a.Node, error) {
|
|||||||
flags := a.Flags(0)
|
flags := a.Flags(0)
|
||||||
line := p.src[0].Line
|
line := p.src[0].Line
|
||||||
switch k := p.peek1(); k {
|
switch k := p.peek1(); k {
|
||||||
case t.IDPackageID, t.IDUse:
|
case t.IDUse:
|
||||||
p.src = p.src[1:]
|
p.src = p.src[1:]
|
||||||
path := p.peek1()
|
path := p.peek1()
|
||||||
if !path.IsStrLiteral(p.tm) {
|
if !path.IsStrLiteral(p.tm) {
|
||||||
@@ -115,19 +113,7 @@ func (p *parser) parseTopLevelDecl() (*a.Node, error) {
|
|||||||
return nil, fmt.Errorf(`parse: expected (implicit) ";", got %q at %s:%d`, got, p.filename, p.line())
|
return nil, fmt.Errorf(`parse: expected (implicit) ";", got %q at %s:%d`, got, p.filename, p.line())
|
||||||
}
|
}
|
||||||
p.src = p.src[1:]
|
p.src = p.src[1:]
|
||||||
if k == t.IDPackageID {
|
return a.NewUse(p.filename, line, path).AsNode(), nil
|
||||||
raw := path.Str(p.tm)
|
|
||||||
s, ok := t.Unescape(raw)
|
|
||||||
if !ok {
|
|
||||||
return nil, fmt.Errorf(`parse: %q is not a valid packageid`, raw)
|
|
||||||
}
|
|
||||||
if u, ok := base38.Encode(s); !ok || u == 0 {
|
|
||||||
return nil, fmt.Errorf(`parse: %q is not a valid packageid`, s)
|
|
||||||
}
|
|
||||||
return a.NewPackageID(p.filename, line, path).AsNode(), nil
|
|
||||||
} else {
|
|
||||||
return a.NewUse(p.filename, line, path).AsNode(), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
case t.IDPub:
|
case t.IDPub:
|
||||||
flags |= a.FlagsPublic
|
flags |= a.FlagsPublic
|
||||||
|
|||||||
+44
-46
@@ -331,29 +331,28 @@ const (
|
|||||||
maxKeyword = 0x9F
|
maxKeyword = 0x9F
|
||||||
|
|
||||||
// TODO: sort these by name, when the list has stabilized.
|
// TODO: sort these by name, when the list has stabilized.
|
||||||
IDFunc = ID(0x80)
|
IDFunc = ID(0x80)
|
||||||
IDAssert = ID(0x81)
|
IDAssert = ID(0x81)
|
||||||
IDWhile = ID(0x82)
|
IDWhile = ID(0x82)
|
||||||
IDIf = ID(0x83)
|
IDIf = ID(0x83)
|
||||||
IDElse = ID(0x84)
|
IDElse = ID(0x84)
|
||||||
IDReturn = ID(0x85)
|
IDReturn = ID(0x85)
|
||||||
IDBreak = ID(0x86)
|
IDBreak = ID(0x86)
|
||||||
IDContinue = ID(0x87)
|
IDContinue = ID(0x87)
|
||||||
IDStruct = ID(0x88)
|
IDStruct = ID(0x88)
|
||||||
IDUse = ID(0x89)
|
IDUse = ID(0x89)
|
||||||
IDVar = ID(0x8A)
|
IDVar = ID(0x8A)
|
||||||
IDPre = ID(0x8B)
|
IDPre = ID(0x8B)
|
||||||
IDInv = ID(0x8C)
|
IDInv = ID(0x8C)
|
||||||
IDPost = ID(0x8D)
|
IDPost = ID(0x8D)
|
||||||
IDVia = ID(0x8E)
|
IDVia = ID(0x8E)
|
||||||
IDPub = ID(0x8F)
|
IDPub = ID(0x8F)
|
||||||
IDPri = ID(0x90)
|
IDPri = ID(0x90)
|
||||||
IDPackageID = ID(0x91)
|
IDConst = ID(0x91)
|
||||||
IDConst = ID(0x92)
|
IDTry = ID(0x92)
|
||||||
IDTry = ID(0x93)
|
IDIterate = ID(0x93)
|
||||||
IDIterate = ID(0x94)
|
IDYield = ID(0x94)
|
||||||
IDYield = ID(0x95)
|
IDIOBind = ID(0x95)
|
||||||
IDIOBind = ID(0x96)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -619,29 +618,28 @@ var builtInsByID = [nBuiltInIDs]string{
|
|||||||
IDRef: "ref",
|
IDRef: "ref",
|
||||||
IDDeref: "deref",
|
IDDeref: "deref",
|
||||||
|
|
||||||
IDFunc: "func",
|
IDFunc: "func",
|
||||||
IDAssert: "assert",
|
IDAssert: "assert",
|
||||||
IDWhile: "while",
|
IDWhile: "while",
|
||||||
IDIf: "if",
|
IDIf: "if",
|
||||||
IDElse: "else",
|
IDElse: "else",
|
||||||
IDReturn: "return",
|
IDReturn: "return",
|
||||||
IDBreak: "break",
|
IDBreak: "break",
|
||||||
IDContinue: "continue",
|
IDContinue: "continue",
|
||||||
IDStruct: "struct",
|
IDStruct: "struct",
|
||||||
IDUse: "use",
|
IDUse: "use",
|
||||||
IDVar: "var",
|
IDVar: "var",
|
||||||
IDPre: "pre",
|
IDPre: "pre",
|
||||||
IDInv: "inv",
|
IDInv: "inv",
|
||||||
IDPost: "post",
|
IDPost: "post",
|
||||||
IDVia: "via",
|
IDVia: "via",
|
||||||
IDPub: "pub",
|
IDPub: "pub",
|
||||||
IDPri: "pri",
|
IDPri: "pri",
|
||||||
IDPackageID: "packageid",
|
IDConst: "const",
|
||||||
IDConst: "const",
|
IDTry: "try",
|
||||||
IDTry: "try",
|
IDIterate: "iterate",
|
||||||
IDIterate: "iterate",
|
IDYield: "yield",
|
||||||
IDYield: "yield",
|
IDIOBind: "io_bind",
|
||||||
IDIOBind: "io_bind",
|
|
||||||
|
|
||||||
IDArray: "array",
|
IDArray: "array",
|
||||||
IDNptr: "nptr",
|
IDNptr: "nptr",
|
||||||
|
|||||||
@@ -12,8 +12,6 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
packageid "adl3"
|
|
||||||
|
|
||||||
// TODO: drop the '?' but still generate wuffs_adler32__hasher__initialize?
|
// TODO: drop the '?' but still generate wuffs_adler32__hasher__initialize?
|
||||||
pub struct hasher?(
|
pub struct hasher?(
|
||||||
state base.u32,
|
state base.u32,
|
||||||
|
|||||||
@@ -12,8 +12,6 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
packageid "crc3"
|
|
||||||
|
|
||||||
// TODO: drop the '?' but still generate wuffs_crc32__ieee_hasher__initialize?
|
// TODO: drop the '?' but still generate wuffs_crc32__ieee_hasher__initialize?
|
||||||
pub struct ieee_hasher?(
|
pub struct ieee_hasher?(
|
||||||
state base.u32,
|
state base.u32,
|
||||||
|
|||||||
@@ -12,8 +12,6 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
packageid "dflt"
|
|
||||||
|
|
||||||
pub status "?bad Huffman code (over-subscribed)"
|
pub status "?bad Huffman code (over-subscribed)"
|
||||||
pub status "?bad Huffman code (under-subscribed)"
|
pub status "?bad Huffman code (under-subscribed)"
|
||||||
pub status "?bad Huffman code length count"
|
pub status "?bad Huffman code length count"
|
||||||
|
|||||||
@@ -12,8 +12,6 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
packageid "gif "
|
|
||||||
|
|
||||||
use "std/lzw"
|
use "std/lzw"
|
||||||
|
|
||||||
pub status "?bad block"
|
pub status "?bad block"
|
||||||
|
|||||||
@@ -12,8 +12,6 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
packageid "gzip"
|
|
||||||
|
|
||||||
use "std/crc32"
|
use "std/crc32"
|
||||||
use "std/deflate"
|
use "std/deflate"
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,6 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
packageid "lzw "
|
|
||||||
|
|
||||||
pub status "?bad code"
|
pub status "?bad code"
|
||||||
pub status "?cyclical prefix chain"
|
pub status "?cyclical prefix chain"
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,6 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
packageid "zlib"
|
|
||||||
|
|
||||||
use "std/adler32"
|
use "std/adler32"
|
||||||
use "std/deflate"
|
use "std/deflate"
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user