wander 0.5.0

The Wander scripting language.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

use wander::parser::Element;
use wander::preludes::common;
use wander::{introspect, Introspection, NoHostType};

pub fn parse_str(input: &str) -> Element {
    introspect(input, &common::<NoHostType>())
        .unwrap()
        .element
        .clone()
}

pub fn introspect_str(input: &str) -> Introspection {
    introspect(input, &common::<NoHostType>()).unwrap()
}