Skip to main content

parse_source_with_options

Function parse_source_with_options 

Source
pub fn parse_source_with_options(input: &str, options: ParseOptions) -> Parse
Expand description

Parse a UTF-8 source string with explicit ParseOptions.

use maya_mel::{ParseMode, ParseOptions, parse_source_with_options};

let parse = parse_source_with_options(
    "print \"hello\"",
    ParseOptions {
        mode: ParseMode::AllowTrailingStmtWithoutSemi,
        ..ParseOptions::default()
    },
);

assert!(parse.errors.is_empty());