Skip to main content

tokenize_annotated

Function tokenize_annotated 

Source
pub fn tokenize_annotated(input: &str) -> Result<Vec<Vec<AnnotatedChar>>>
Expand description

Tokenize and return annotated characters per token for policy evaluation.

Each token is a Vec<AnnotatedChar> preserving the quoting context of every character. This allows the context-aware policy to distinguish between echo "hello;world" (semicolon in double quotes) and echo hello;world (bare semicolon).