Open ejrgilbert opened 1 month ago
I was thinking something like the following might work?
enum ProviderInfo {
/// TODO -- documentation for Begin
Begin,
/// TODO -- documentation for End
End,
/// TODO -- documentation for Wasm
Wasm {
packages: WasmPackageInfo
}
}
impl ProviderInfo {
fn get_packages(provider: &ProviderInfo) -> Option<&dyn PackageInfo>{
match provider {
Self::Begin | Self::End => None,
Self::Wasm {packages} => Some(packages)
}
}
}
trait PackageInfo {}
enum WasmPackageInfo {
Bytecode
}
impl PackageInfo for WasmPackageInfo {}
enum WasmBytecodeEvents {
/// TODO -- documentation for Call
Call,
/// TODO -- documentation for BrIf
BrIf,
/// TODO -- documentation for BrTable
BrTable
// ...continue here
}
Currently, everything is just stored as
String
s that you have to manage in thesrc/parser/types.rs
file. Rather, there should be some combination ofstruct
s/enum
s that can be documented/referenced like in the CLIclap
specification.This will make things cleaner and easier-to-manage.