wain-ast 0.2.2

WebAssembly abstract syntax tree definition used by both binary format and text format for wain project
Documentation
1
2
3
4
5
6
7
8
9
use std::fmt;

// Trait to handle source for better error message. Wasm has two format text and binary.
// This trait handles them with one generics.
pub trait Source: Clone {
    type Raw;
    fn describe(&self, f: &mut fmt::Formatter<'_>, offset: usize) -> fmt::Result;
    fn raw(&self) -> Self::Raw;
}