Use bitflags.

This commit is contained in:
Stephen Chung
2022-11-23 11:36:30 +08:00
parent d911327242
commit 4e27039521
33 changed files with 294 additions and 259 deletions

View File

@@ -764,6 +764,8 @@ impl Engine {
// Import statement
#[cfg(not(feature = "no_module"))]
Stmt::Import(x, _pos) => {
use crate::ModuleResolver;
let (expr, export) = &**x;
// Guard against too many modules
@@ -777,8 +779,6 @@ impl Engine {
self.make_type_mismatch_err::<crate::ImmutableString>(typ, expr.position())
})?;
use crate::ModuleResolver;
let path_pos = expr.start_position();
let resolver = global.embedded_module_resolver.clone();