Struct sljs::runtime::JSONParser
source · [−]pub struct JSONParser;
Expand description
Not-really-a-Parser
implementation that just deserializes a JSON ESTree.
Trait Implementations
sourceimpl Debug for JSONParser
impl Debug for JSONParser
sourceimpl Parser for JSONParser
impl Parser for JSONParser
sourcefn parse(&self, input: &str, _heap: &mut Heap) -> EvalResult<Program>
fn parse(&self, input: &str, _heap: &mut Heap) -> EvalResult<Program>
Parses an input into a Program
(potentially using the heap
)
sourcefn eval_func(&self) -> HostFn
fn eval_func(&self) -> HostFn
Get the native callback for eval()
in JavaScript provided by this parser
sourcefn load(&mut self, heap: &mut Heap) -> EvalResult<()>
fn load(&mut self, heap: &mut Heap) -> EvalResult<()>
Called by Runtime::load
to initialize the parser. Read more
Auto Trait Implementations
impl RefUnwindSafe for JSONParser
impl Send for JSONParser
impl Sync for JSONParser
impl Unpin for JSONParser
impl UnwindSafe for JSONParser
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more