pub struct CompileOptions {
pub std_globals: bool,
pub global_definitions: Vec<GlobalDefinitions>,
}Expand description
What resolve_for_compile injects into the global scope before it
resolves.
Default is hermesc’s default: the standard globals on, nothing else.
Fields§
§std_globals: boolDeclare the JavaScript standard library’s globals (Object, Math,
print, …) — hermesc’s -fstd-globals, on by default there too.
With this off, every reference to a standard global resolves to an
implicitly created UndeclaredGlobalProperty instead of to an ambient
declaration; nothing fails, but the SemContext differs. The
declarations are crate::libhermes::LIBHERMES, compiled into this
crate.
global_definitions: Vec<GlobalDefinitions>Additional ambient declaration files, parsed in this order after the
standard globals — hermesc’s -include-globals.
A parse error in one of these is reported like any other and makes
resolve_for_compile fail.
Trait Implementations§
Source§impl Clone for CompileOptions
impl Clone for CompileOptions
Source§fn clone(&self) -> CompileOptions
fn clone(&self) -> CompileOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompileOptions
impl Debug for CompileOptions
Source§impl Default for CompileOptions
impl Default for CompileOptions
impl Eq for CompileOptions
Source§impl PartialEq for CompileOptions
impl PartialEq for CompileOptions
impl StructuralPartialEq for CompileOptions
Auto Trait Implementations§
impl Freeze for CompileOptions
impl RefUnwindSafe for CompileOptions
impl Send for CompileOptions
impl Sync for CompileOptions
impl Unpin for CompileOptions
impl UnsafeUnpin for CompileOptions
impl UnwindSafe for CompileOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more