pub fn tokenize_str_with_options(
input: &str,
options: &TokenizerOptions,
) -> Result<Vec<Token>, TokenizerError>Expand description
Break the given input shell script string into tokens, returning the tokens.
§Arguments
input- The shell script to tokenize.options- Options controlling how the tokenizer operates.
§Errors
crate::TokenizerError::UnterminatedEscapeSequence,crate::TokenizerError::UnterminatedSingleQuote,crate::TokenizerError::UnterminatedAnsiCQuote,crate::TokenizerError::UnterminatedDoubleQuote,crate::TokenizerError::UnterminatedBackquoteorcrate::TokenizerError::UnterminatedExtendedGlobif the input ends inside the matching quoting construct.crate::TokenizerError::UnterminatedVariable,crate::TokenizerError::UnterminatedCommandSubstitutionorcrate::TokenizerError::UnterminatedExpansionif the input ends inside a${...},$(...),$((...))or$[...]expansion.crate::TokenizerError::UnterminatedHereDocumentsif the input ends before the body of a declared here-document.crate::TokenizerError::MissingHereTagorcrate::TokenizerError::MissingHereTagAtEndOfInputif a<<or<<-operator has no tag.crate::TokenizerError::ExpansionNestingTooDeepif expansions nest more than 32 levels deep.