Nick Fitzgerald 3879f6f427 Introduce the wasm-bindgen-webidl frontend
This is still a work in progress. Parse WebIDL source text and convert it into
wasm-bindgen AST, so that we can automatically emit bindings for the types and
functions described in the WebIDL.
2018-05-29 14:22:53 -07:00

25 lines
695 B
Rust

use super::backend;
use proc_macro2;
use syn;
assert_parse!(
event,
include_str!("./Event.webidl"),
backend::ast::Program {
exports: vec![],
imports: vec![backend::ast::Import {
module: None,
version: None,
js_namespace: None,
kind: backend::ast::ImportKind::Type(backend::ast::ImportType {
vis: syn::Visibility::Public(syn::VisPublic {
pub_token: syn::token::Pub(proc_macro2::Span::call_site()),
}),
name: syn::Ident::new("Event", proc_macro2::Span::call_site()),
}),
}],
enums: vec![],
structs: vec![],
}
);