1
1
use std:: { fmt, rc:: Rc } ;
2
2
3
3
use rant:: {
4
- compiler:: { CompilerErrorKind , CompilerMessage } ,
4
+ compiler:: { CompilerError , CompilerMessage } ,
5
5
runtime:: { RuntimeError , VM } ,
6
- AsRantFunction , Rant , RantOptions , RantValue ,
6
+ AsRantFunction , NoModuleResolver , Rant , RantOptions , RantValue ,
7
7
} ;
8
8
use wasm_bindgen:: prelude:: * ;
9
9
@@ -18,10 +18,9 @@ pub fn rant(input: &str, seed: u32) -> Result<String, JsValue> {
18
18
fn _rant ( input : & str , seed : u32 ) -> Result < RantValue , RantError > {
19
19
let options = RantOptions {
20
20
seed : seed. into ( ) ,
21
- enable_require : false ,
22
21
..Default :: default ( )
23
22
} ;
24
- let mut rant = Rant :: with_options ( options) ;
23
+ let mut rant = Rant :: with_options ( options) . using_module_resolver ( NoModuleResolver ) ;
25
24
register_markdown_functions ( & mut rant) ;
26
25
27
26
let mut msgs: Vec < CompilerMessage > = vec ! [ ] ;
@@ -83,7 +82,7 @@ impl fmt::Display for RantError {
83
82
84
83
#[ derive( Debug ) ]
85
84
struct CompilerErrorWithMsgs {
86
- err : CompilerErrorKind ,
85
+ err : CompilerError ,
87
86
msgs : Vec < CompilerMessage > ,
88
87
}
89
88
0 commit comments