gsh/input/buffer

The buffer module handles multiline input detection for the REPL.

When a user types a command that spans multiple lines (like a case statement, a long list, or a function definition), this module analyzes the syntax tree’s surface level to determine if the user is finished typing or if the shell should prompt for a continuation line (...>).

Values

pub fn is_complete(input: String) -> Bool

Evaluates a string of Gleam source code to determine if it is structurally complete. It uses the lexer to verify that no strings are left open, and all opened parentheses (), square brackets [], and curly braces {} have been properly closed.

Search Document