WASIComponentWitDocument class final

WIT document boundary model for Preview2/Preview3 adapters.

This parser intentionally stops at package/interface/world boundaries. It gives adapter generation a structured, diagnosable input without claiming full WIT semantic coverage.

Constructors

WASIComponentWitDocument({required List<WASIComponentWitInterface> interfaces, required List<WASIComponentWitWorld> worlds, WASIComponentWitPackage? package})
Creates a parsed WIT document from already-normalized declarations.
WASIComponentWitDocument.parse(String source, {String sourceName = '<wit>'})
Parses source into the package/interface/world boundary model.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
interfaces List<WASIComponentWitInterface>
Top-level interfaces declared by this document.
final
package WASIComponentWitPackage?
Optional top-level WIT package declaration.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
worlds List<WASIComponentWitWorld>
Top-level worlds declared by this document.
final

Methods

interfaceNamed(String name) WASIComponentWitInterface?
Returns the interface named name, if this document declares one.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
worldNamed(String name) WASIComponentWitWorld?
Returns the world named name, if this document declares one.

Operators

operator ==(Object other) bool
The equality operator.
inherited