Rename the language from Dino to Rex

Files use .rex, the command is rex, and the crate, runtime prefixes,
docs, editor files and examples all use the new name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Your NameandClaude Opus 5.5 committed 2026-11-08 13:51:23 +01:00
1 parent 2f44f09b6a
commit 7cf9727bcd
94 files changed
+858 -858

No files matched your search

+10 -10
View File
@@ -1,9 +1,9 @@
//! Tests of `dino fmt`.
//! Tests of `rex fmt`.
use dino::fmt::format;
use rex::fmt::format;
fn fmt(src: &str) -> String {
format(src).unwrap_or_else(|d| panic!("{}", d.render("test.dino", src)))
format(src).unwrap_or_else(|d| panic!("{}", d.render("test.rex", src)))
}
#[test]
@@ -59,12 +59,12 @@ fn broken_code_is_refused() {
assert!(format("func main( {").is_err());
}
fn dino_files(dir: &std::path::Path, out: &mut Vec<std::path::PathBuf>) {
fn rex_files(dir: &std::path::Path, out: &mut Vec<std::path::PathBuf>) {
for e in std::fs::read_dir(dir).unwrap() {
let p = e.unwrap().path();
if p.is_dir() {
dino_files(&p, out);
} else if p.extension().map_or(false, |x| x == "dino") {
rex_files(&p, out);
} else if p.extension().map_or(false, |x| x == "rex") {
out.push(p);
}
}
@@ -73,12 +73,12 @@ fn dino_files(dir: &std::path::Path, out: &mut Vec<std::path::PathBuf>) {
#[test]
fn examples_are_formatted_and_formatting_is_stable() {
let mut files = Vec::new();
dino_files(&std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("examples"), &mut files);
rex_files(&std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("examples"), &mut files);
assert!(files.len() > 30);
for f in files {
let src = std::fs::read_to_string(&f).unwrap();
let once = fmt(&src);
assert_eq!(once, src, "{} is not formatted (run `dino fmt examples`)", f.display());
assert_eq!(once, src, "{} is not formatted (run `rex fmt examples`)", f.display());
assert_eq!(fmt(&once), once, "formatting {} twice differs", f.display());
}
}
@@ -91,8 +91,8 @@ fn doc_examples_are_stable() {
let p = e.unwrap().path();
let text = std::fs::read_to_string(&p).unwrap();
let mut rest = text.as_str();
while let Some(start) = rest.find("```dino\n") {
let after = &rest[start + 8..];
while let Some(start) = rest.find("```rex\n") {
let after = &rest[start + "```rex\n".len()..];
let end = after.find("```").unwrap();
let code = &after[..end];
rest = &after[end + 3..];