-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wit, testdata: use semicolons as delimiters in WIT text format
- Loading branch information
Showing
50 changed files
with
538 additions
and
538 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package foo:comments | ||
package foo:comments; | ||
|
||
interface foo { | ||
type bar = stream<x, _> | ||
type x = u32 | ||
type bar = stream<x, _>; | ||
type x = u32; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,53 @@ | ||
package foo:bar | ||
package foo:bar; | ||
|
||
interface a {} | ||
|
||
interface b {} | ||
|
||
world bar-a { | ||
import a | ||
import b | ||
import a; | ||
import b; | ||
} | ||
|
||
|
||
package foo:baz | ||
package foo:baz; | ||
|
||
interface a {} | ||
|
||
interface b {} | ||
|
||
world baz-a { | ||
import a | ||
import b | ||
import a; | ||
import b; | ||
} | ||
|
||
|
||
package foo:root | ||
package foo:root; | ||
|
||
interface ai {} | ||
|
||
interface bi {} | ||
|
||
world a { | ||
import ai | ||
import bi | ||
import ai; | ||
import bi; | ||
} | ||
|
||
world b { | ||
import foo:bar/a | ||
import foo:bar/b | ||
import foo:bar/a; | ||
import foo:bar/b; | ||
} | ||
|
||
world c { | ||
import foo:bar/a | ||
import foo:bar/b | ||
import foo:bar/a; | ||
import foo:bar/b; | ||
} | ||
|
||
world union-world { | ||
import foo:bar/a | ||
import foo:bar/b | ||
import foo:baz/a | ||
import foo:baz/b | ||
import ai | ||
import bi | ||
import foo:bar/a; | ||
import foo:bar/b; | ||
import foo:baz/a; | ||
import foo:baz/b; | ||
import ai; | ||
import bi; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
package some:dep | ||
package some:dep; | ||
|
||
interface foo { | ||
resource r {} // TODO: constructor, methods, and static functions | ||
resource r {} // TODO: constructor, methods, and static functions; | ||
} | ||
|
||
|
||
package foo:bar | ||
package foo:bar; | ||
|
||
interface foo { | ||
use some:dep/foo.{r} | ||
type t = own<r> | ||
use some:dep/foo.{r}; | ||
type t = own<r>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
package foo:dep1 | ||
package foo:dep1; | ||
|
||
interface types {} | ||
|
||
|
||
package foo:dep2 | ||
package foo:dep2; | ||
|
||
interface types {} | ||
|
||
|
||
package foo:foo | ||
package foo:foo; | ||
|
||
world foo { | ||
import foo:dep1/types | ||
import foo:dep2/types | ||
import foo:dep1/types; | ||
import foo:dep2/types; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
package foo:diamond | ||
package foo:diamond; | ||
|
||
interface shared1 { | ||
type the-type = u32 | ||
type the-type = u32; | ||
} | ||
|
||
interface shared2 { | ||
type the-type = u32 | ||
type the-type = u32; | ||
} | ||
|
||
world foo { | ||
import interface bar { | ||
use foo:diamond/shared2.{the-type} | ||
} | ||
use foo:diamond/shared2.{the-type}; | ||
}; | ||
import interface foo { | ||
use foo:diamond/shared1.{the-type} | ||
} | ||
import shared1 | ||
import shared2 | ||
use foo:diamond/shared1.{the-type}; | ||
}; | ||
import shared1; | ||
import shared2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
package foo:foo | ||
package foo:foo; | ||
|
||
interface foo { | ||
x: func() | ||
y: func() | ||
z: func() | ||
x: func(); | ||
y: func(); | ||
z: func(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
package foo:empty | ||
package foo:empty; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,98 +1,98 @@ | ||
package foo:another-pkg | ||
package foo:another-pkg; | ||
|
||
interface other-interface {} | ||
|
||
|
||
package foo:corp | ||
package foo:corp; | ||
|
||
interface saas {} | ||
|
||
|
||
package foo:different-pkg | ||
package foo:different-pkg; | ||
|
||
interface i {} | ||
|
||
|
||
package foo:foreign-pkg | ||
package foo:foreign-pkg; | ||
|
||
interface the-default { | ||
type some-type = u32 | ||
type some-type = u32; | ||
} | ||
|
||
|
||
package foo:some-pkg | ||
package foo:some-pkg; | ||
|
||
interface another-interface { | ||
type yet-another-type = u8 | ||
type yet-another-type = u8; | ||
} | ||
|
||
interface some-interface { | ||
type another-type = u32 | ||
type another-type = u32; | ||
} | ||
|
||
interface the-default { | ||
type from-default = string | ||
type from-default = string; | ||
} | ||
|
||
|
||
package foo:wasi | ||
package foo:wasi; | ||
|
||
interface clocks { | ||
type timestamp = u64 | ||
type timestamp = u64; | ||
} | ||
|
||
interface filesystem { | ||
record stat { ino: u64 } | ||
record stat { ino: u64 }; | ||
} | ||
|
||
world wasi { | ||
import clocks | ||
import filesystem | ||
import clocks; | ||
import filesystem; | ||
} | ||
|
||
|
||
package foo:root | ||
package foo:root; | ||
|
||
interface bar { | ||
use foo:some-pkg/some-interface.{another-type} | ||
use foo:some-pkg/the-default.{from-default} | ||
use foo:some-pkg/another-interface.{yet-another-type} | ||
use foo:some-pkg/some-interface.{another-type}; | ||
use foo:some-pkg/the-default.{from-default}; | ||
use foo:some-pkg/another-interface.{yet-another-type}; | ||
} | ||
|
||
interface foo { | ||
use foo:wasi/filesystem.{stat} | ||
use foo:wasi/clocks.{timestamp} | ||
use foo:wasi/filesystem.{stat}; | ||
use foo:wasi/clocks.{timestamp}; | ||
} | ||
|
||
interface use1 { | ||
use foo:foreign-pkg/the-default.{some-type} | ||
use foo:foreign-pkg/the-default.{some-type}; | ||
} | ||
|
||
interface use2 { | ||
use foo:foreign-pkg/the-default.{some-type} | ||
use foo:foreign-pkg/the-default.{some-type}; | ||
} | ||
|
||
world bars-world { | ||
import foo:another-pkg/other-interface | ||
import foo:some-pkg/the-default | ||
import foo:another-pkg/other-interface; | ||
import foo:some-pkg/the-default; | ||
} | ||
|
||
world my-world { | ||
import foo:wasi/clocks | ||
import foo:wasi/filesystem | ||
export foo:corp/saas | ||
import foo:wasi/clocks; | ||
import foo:wasi/filesystem; | ||
export foo:corp/saas; | ||
} | ||
|
||
world my-world2 { | ||
import foo:wasi/clocks | ||
import foo:wasi/filesystem | ||
export foo:corp/saas | ||
export foo | ||
import foo:wasi/clocks; | ||
import foo:wasi/filesystem; | ||
export foo:corp/saas; | ||
export foo; | ||
} | ||
|
||
world unionw-world { | ||
import foo:wasi/clocks | ||
import foo:wasi/filesystem | ||
export foo:corp/saas | ||
export foo | ||
import foo:wasi/clocks; | ||
import foo:wasi/filesystem; | ||
export foo:corp/saas; | ||
export foo; | ||
} |
Oops, something went wrong.