Crate wac_parser

Source
Expand description

A library for encoding and decoding WebAssembly compositions.

Modules§

lexer
Module for the lexer implementation.
resolution
Module for resolving WAC ASTs.

Structs§

AccessExpr
Represents an access expression in the AST.
Constructor
Represents a resource constructor in the AST.
DocComment
Represents a documentation comment in the AST.
Document
Represents a top-level WAC document.
DocumentPrinter
A printer for WAC documents.
EnumCase
Represents an enum case in the AST.
EnumDecl
Represents an enum declaration in the AST.
ExportStatement
Represents an export statement in the AST.
Expr
Represents an expression in the AST.
Field
Represents a record field in the AST.
Flag
Represents a flag in the AST.
FlagsDecl
Represents a flags declaration in the AST.
FuncType
Represents a function type in the AST.
Ident
Represents an identifier in the AST.
ImportStatement
Represents an import statement in the AST.
InlineInterface
Represents an inline interface in the AST.
InterfaceDecl
Represents an interface declaration in the AST.
InterfaceExport
Represents an interface export in the AST.
LetStatement
Represents a let statement in the AST.
Lookahead
Used to look ahead one token in the lexer.
Method
Represents a resource method in the AST.
NamedAccessExpr
Represents a named access expression in the AST.
NamedInstantiationArgument
Represents a named instantiation argument in the AST.
NamedType
Represents a name and an associated type in the AST.
NamedWorldItem
Represents a named world item in the AST.
NestedExpr
Represents a nested expression in the AST.
NewExpr
Represents a new expression in the AST.
PackageDirective
Represents a package directive in the AST.
PackageName
Represents a package name in the AST.
PackagePath
AST representation of a path to an item such as a world in a package (e.g. foo:bar/qux).
RecordDecl
Represents a record declaration in the AST.
ResourceDecl
Represents a resource declaration in the AST.
String
Represents a string in the AST.
TypeAlias
Represents a type alias in the AST.
Use
Represents a “use” in the AST.
UseItem
Represents a use item in the AST.
VariantCase
Represents a variant case in the AST.
VariantDecl
Represents a variant declaration in the AST.
WorldDecl
Represents a world declaration in the AST.
WorldExport
Represents a world export in the AST.
WorldImport
Represents a world import in the AST.
WorldInclude
Represents a world include in the AST.
WorldIncludeItem
Represents a renaming of an included name.

Enums§

Error
Represents a parse error.
ExportOptions
Represents an item being exported in the AST.
ExternName
Represents an extern name following an as clause in the AST.
ExternType
Represents the external type of a world item in the AST.
FuncTypeRef
Represents a function type reference in the AST.
ImportType
Represents an import type in the AST.
InstantiationArgument
Represents an instantiation argument in the AST.
InstantiationArgumentName
Represents the argument name in an instantiation argument in the AST.
InterfaceItem
Represents an interface item in the AST.
ItemTypeDecl
Represents an interface or world type declaration in the AST.
PostfixExpr
Represents a postfix expression in the AST.
PrimaryExpr
Represents a primary expression in the AST.
ResourceMethod
Represents a resource method in the AST.
ResultList
Represents a result list in the AST.
Statement
Represents a statement in the AST.
Type
Represents a type in the AST.
TypeAliasKind
Represents a type alias kind in the AST.
TypeDecl
Represents a top-level type declaration in the AST.
TypeStatement
Represents a type statement in the AST.
UsePath
Represents a use path in the AST.
WorldItem
Represents a world item in the AST.
WorldItemPath
Represents a world item path in the AST.
WorldRef
Represents a reference to a world in the AST (local or foreign).

Functions§

parse_optional
Parses an optional tokens from a lexer.
parse_token
Expects a given token from the lexer.

Type Aliases§

ParseResult
Represents a parse result.