Skip to main content

bracket_depth_delta

Function bracket_depth_delta 

Source
pub fn bracket_depth_delta(line: &str) -> i32
Expand description

Returns the net bracket-depth change for line (counting [ as +1, ] as -1).

Respects string literals and inline %/# comments. Used by the REPL to detect unclosed matrix literals that span multiple input lines.