Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cli/src/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ impl Validator for RLHelper {
&self,
context: &mut ValidationContext<'_>,
) -> Result<ValidationResult, ReadlineError> {
// Dot commands are handled by the REPL loop, not the JS parser.
if context.input().trim_start().starts_with('.') {
return Ok(ValidationResult::Valid(None));
}

let mut parser = boa_parser::Parser::new(Source::from_bytes(context.input()));
if self.strict {
parser.set_strict();
Expand Down
Loading