mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-04 00:54:36 +00:00
removed editor, ast, markup crate
This commit is contained in:
parent
a616b61503
commit
99cfd1fe92
149 changed files with 97 additions and 29987 deletions
|
@ -3,7 +3,7 @@ use roc_build::link::LinkType;
|
|||
use roc_build::program::{check_file, CodeGenBackend};
|
||||
use roc_cli::{
|
||||
build_app, format, test, BuildConfig, FormatMode, CMD_BUILD, CMD_CHECK, CMD_DEV, CMD_DOCS,
|
||||
CMD_EDIT, CMD_FORMAT, CMD_GEN_STUB_LIB, CMD_GLUE, CMD_REPL, CMD_RUN, CMD_TEST, CMD_VERSION,
|
||||
CMD_FORMAT, CMD_GEN_STUB_LIB, CMD_GLUE, CMD_REPL, CMD_RUN, CMD_TEST, CMD_VERSION,
|
||||
DIRECTORY_OR_FILES, FLAG_CHECK, FLAG_DEV, FLAG_LIB, FLAG_NO_LINK, FLAG_TARGET, FLAG_TIME,
|
||||
GLUE_DIR, GLUE_SPEC, ROC_FILE,
|
||||
};
|
||||
|
@ -52,9 +52,7 @@ fn main() -> io::Result<()> {
|
|||
LinkType::Executable,
|
||||
)
|
||||
} else {
|
||||
launch_editor(None)?;
|
||||
|
||||
Ok(0)
|
||||
Ok(1)
|
||||
}
|
||||
}
|
||||
Some((CMD_RUN, matches)) => {
|
||||
|
@ -213,22 +211,6 @@ fn main() -> io::Result<()> {
|
|||
}
|
||||
}
|
||||
Some((CMD_REPL, _)) => Ok(roc_repl_cli::main()),
|
||||
Some((CMD_EDIT, matches)) => {
|
||||
match matches
|
||||
.get_many::<OsString>(DIRECTORY_OR_FILES)
|
||||
.map(|mut values| values.next())
|
||||
{
|
||||
Some(Some(os_string)) => {
|
||||
launch_editor(Some(Path::new(os_string)))?;
|
||||
}
|
||||
_ => {
|
||||
launch_editor(None)?;
|
||||
}
|
||||
}
|
||||
|
||||
// Exit 0 if the editor exited normally
|
||||
Ok(0)
|
||||
}
|
||||
Some((CMD_DOCS, matches)) => {
|
||||
let root_path = matches.get_one::<PathBuf>(ROC_FILE).unwrap();
|
||||
|
||||
|
@ -333,13 +315,3 @@ fn roc_files_recursive<P: AsRef<Path>>(
|
|||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(feature = "editor")]
|
||||
fn launch_editor(project_dir_path: Option<&Path>) -> io::Result<()> {
|
||||
roc_editor::launch(project_dir_path)
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "editor"))]
|
||||
fn launch_editor(_project_dir_path: Option<&Path>) -> io::Result<()> {
|
||||
panic!("Cannot launch the editor because this build of roc did not include `feature = \"editor\"`!");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue