"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "cli/tools/repl.rs" between
deno-1.12.0.tar.gz and deno-1.12.1.tar.gz

About: Deno is is a simple, modern and secure runtime for JavaScript and TypeScript that uses the V8 JavaScript engine and is built in Rust.

repl.rs  (deno-1.12.0):repl.rs  (deno-1.12.1)
skipping to change at line 32 skipping to change at line 32
use rustyline::validate::Validator; use rustyline::validate::Validator;
use rustyline::CompletionType; use rustyline::CompletionType;
use rustyline::Config; use rustyline::Config;
use rustyline::Context; use rustyline::Context;
use rustyline::Editor; use rustyline::Editor;
use rustyline_derive::{Helper, Hinter}; use rustyline_derive::{Helper, Hinter};
use std::borrow::Cow; use std::borrow::Cow;
use std::cell::RefCell; use std::cell::RefCell;
use std::path::PathBuf; use std::path::PathBuf;
use std::sync::Arc; use std::sync::Arc;
use swc_ecmascript::parser::error::SyntaxError;
use swc_ecmascript::parser::token::{Token, Word}; use swc_ecmascript::parser::token::{Token, Word};
use tokio::sync::mpsc::channel; use tokio::sync::mpsc::channel;
use tokio::sync::mpsc::unbounded_channel; use tokio::sync::mpsc::unbounded_channel;
use tokio::sync::mpsc::Receiver; use tokio::sync::mpsc::Receiver;
use tokio::sync::mpsc::Sender; use tokio::sync::mpsc::Sender;
use tokio::sync::mpsc::UnboundedReceiver; use tokio::sync::mpsc::UnboundedReceiver;
use tokio::sync::mpsc::UnboundedSender; use tokio::sync::mpsc::UnboundedSender;
// Provides helpers to the editor like validation for multi-line edits, completi on candidates for // Provides helpers to the editor like validation for multi-line edits, completi on candidates for
// tab completion. // tab completion.
skipping to change at line 260 skipping to change at line 261
left left
)))) ))))
} }
(None, _) => { (None, _) => {
// While technically invalid when unpaired, it should be V8's ta sk to output error instead. // While technically invalid when unpaired, it should be V8's ta sk to output error instead.
// Thus marked as valid with no info. // Thus marked as valid with no info.
return Ok(ValidationResult::Valid(None)); return Ok(ValidationResult::Valid(None));
} }
} }
} }
Token::Error(error) => {
match error.kind() {
// If there is unterminated template, it continues to read input.
SyntaxError::UnterminatedTpl => {}
_ => {
// If it failed parsing, it should be V8's task to output error
instead.
// Thus marked as valid with no info.
return Ok(ValidationResult::Valid(None));
}
}
}
_ => {} _ => {}
} }
} }
} }
if !stack.is_empty() || in_template { if !stack.is_empty() || in_template {
return Ok(ValidationResult::Incomplete); return Ok(ValidationResult::Incomplete);
} }
Ok(ValidationResult::Valid(None)) Ok(ValidationResult::Valid(None))
 End of changes. 2 change blocks. 
0 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)