mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
Move WELCOME_MESSAGE to be cli-specific
This commit is contained in:
parent
0ab49454b3
commit
e6b9446755
4 changed files with 17 additions and 17 deletions
|
@ -20,6 +20,18 @@ use target_lexicon::Triple;
|
|||
|
||||
use crate::cli_gen::eval_llvm;
|
||||
|
||||
pub const WELCOME_MESSAGE: &str = concatcp!(
|
||||
"\n The rockin’ ",
|
||||
BLUE,
|
||||
"roc repl",
|
||||
END_COL,
|
||||
"\n",
|
||||
PINK,
|
||||
"────────────────────────",
|
||||
END_COL,
|
||||
"\n\n"
|
||||
);
|
||||
|
||||
#[derive(Completer, Helper, Hinter, Default)]
|
||||
pub struct ReplHelper {
|
||||
validator: InputValidator,
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
use roc_repl_cli::WELCOME_MESSAGE;
|
||||
use roc_repl_ui::SHORT_INSTRUCTIONS;
|
||||
use roc_test_utils::assert_multiline_str_eq;
|
||||
use std::env;
|
||||
use std::io::Write;
|
||||
use std::path::PathBuf;
|
||||
use std::process::{Command, ExitStatus, Stdio};
|
||||
|
||||
use roc_repl_ui::{SHORT_INSTRUCTIONS, WELCOME_MESSAGE};
|
||||
use roc_test_utils::assert_multiline_str_eq;
|
||||
|
||||
const ERROR_MESSAGE_START: char = '─';
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
|
@ -1403,7 +1403,7 @@ fn interpolation_with_nested_interpolation() {
|
|||
<https://www.roc-lang.org/tutorial#string-interpolation>
|
||||
|
||||
|
||||
Enter an expression to evaluate, or a definition (like x = 1) to use in future expressions.
|
||||
Enter an expression to evaluate, or a definition (like x = 1) to use later.
|
||||
|
||||
Tips:
|
||||
|
||||
|
|
|
@ -11,25 +11,13 @@ use roc_parse::ast::{Expr, ValueDef};
|
|||
use roc_repl_eval::gen::{Problems, ReplOutput};
|
||||
use roc_reporting::report::StyleCodes;
|
||||
|
||||
pub const WELCOME_MESSAGE: &str = concatcp!(
|
||||
"\n The rockin’ ",
|
||||
BLUE,
|
||||
"roc repl",
|
||||
END_COL,
|
||||
"\n",
|
||||
PINK,
|
||||
"────────────────────────",
|
||||
END_COL,
|
||||
"\n\n"
|
||||
);
|
||||
|
||||
// TODO add link to repl tutorial(does not yet exist).
|
||||
pub const TIPS: &str = concatcp!(
|
||||
"\nEnter an expression to evaluate, or a definition (like ",
|
||||
BLUE,
|
||||
"x = 1",
|
||||
END_COL,
|
||||
") to use in future expressions.\n\nTips:\n\n",
|
||||
") to use later.\n\nTips:\n\n",
|
||||
if cfg!(target_family = "wasm") {
|
||||
// In the web REPL, the :quit command doesn't make sense. Just close the browser tab!
|
||||
// We use Shift-Enter for newlines because it's nicer than our workaround for Unix terminals (see below)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue