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

+6 -6
View File
@@ -1,20 +1,20 @@
// Starts `dino lsp` and connects the editor to it. All the work is done by the compiler.
// Starts `rex lsp` and connects the editor to it. All the work is done by the compiler.
const vscode = require('vscode');
const { LanguageClient } = require('vscode-languageclient/node');
let client;
function activate() {
const command = vscode.workspace.getConfiguration('dino').get('serverPath') || 'dino';
const command = vscode.workspace.getConfiguration('rex').get('serverPath') || 'rex';
client = new LanguageClient(
'dino',
'Dino Language Server',
'rex',
'Rex Language Server',
{ command, args: ['lsp'] },
{ documentSelector: [{ scheme: 'file', language: 'dino' }] }
{ documentSelector: [{ scheme: 'file', language: 'rex' }] }
);
client.start().catch((err) => {
vscode.window.showErrorMessage(
`Could not start "${command} lsp": ${err.message}. Put the dino program on your PATH or set "dino.serverPath".`
`Could not start "${command} lsp": ${err.message}. Put the rex program on your PATH or set "rex.serverPath".`
);
});
}
+16 -16
View File
@@ -1,43 +1,43 @@
{
"name": "dino",
"displayName": "Dino",
"description": "Syntax highlighting, error checking and formatting for the Dino language",
"name": "rex",
"displayName": "Rex",
"description": "Syntax highlighting, error checking and formatting for the Rex language",
"version": "0.1.0",
"publisher": "dino-lang",
"publisher": "rex-lang",
"license": "MIT",
"engines": { "vscode": "^1.75.0" },
"categories": ["Programming Languages", "Formatters"],
"activationEvents": ["onLanguage:dino"],
"activationEvents": ["onLanguage:rex"],
"main": "./extension.js",
"dependencies": { "vscode-languageclient": "^9.0.1" },
"contributes": {
"languages": [
{
"id": "dino",
"aliases": ["Dino", "dino"],
"extensions": [".dino"],
"id": "rex",
"aliases": ["Rex", "rex"],
"extensions": [".rex"],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "dino",
"scopeName": "source.dino",
"path": "./syntaxes/dino.tmLanguage.json"
"language": "rex",
"scopeName": "source.rex",
"path": "./syntaxes/rex.tmLanguage.json"
}
],
"configuration": {
"title": "Dino",
"title": "Rex",
"properties": {
"dino.serverPath": {
"rex.serverPath": {
"type": "string",
"default": "dino",
"description": "The `dino` program that provides the language server (it is started as `dino lsp`)."
"default": "rex",
"description": "The `rex` program that provides the language server (it is started as `rex lsp`)."
}
}
},
"configurationDefaults": {
"[dino]": {
"[rex]": {
"editor.insertSpaces": true,
"editor.tabSize": 4,
"editor.formatOnSave": true
@@ -1,103 +0,0 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "Dino",
"scopeName": "source.dino",
"patterns": [
{ "include": "#comments" },
{ "include": "#strings" },
{ "include": "#chars" },
{ "include": "#declarations" },
{ "include": "#keywords" },
{ "include": "#constants" },
{ "include": "#numbers" },
{ "include": "#types" },
{ "include": "#calls" },
{ "include": "#operators" }
],
"repository": {
"comments": {
"patterns": [
{ "name": "comment.line.double-slash.dino", "match": "//.*$" },
{ "name": "comment.block.dino", "begin": "/\\*", "end": "\\*/" }
]
},
"strings": {
"name": "string.quoted.double.dino",
"begin": "\"",
"end": "\"",
"patterns": [
{ "name": "constant.character.escape.dino", "match": "\\\\." },
{
"name": "meta.interpolation.dino",
"begin": "\\{",
"end": "\\}",
"beginCaptures": { "0": { "name": "punctuation.section.interpolation.begin.dino" } },
"endCaptures": { "0": { "name": "punctuation.section.interpolation.end.dino" } },
"patterns": [{ "include": "$self" }]
}
]
},
"chars": {
"name": "string.quoted.single.dino",
"match": "'(?:\\\\.|[^'\\\\])'",
"captures": {}
},
"declarations": {
"patterns": [
{
"match": "\\b(func)\\s+([A-Za-z_][A-Za-z0-9_]*)",
"captures": {
"1": { "name": "keyword.declaration.function.dino" },
"2": { "name": "entity.name.function.dino" }
}
},
{
"match": "\\b(struct|enum|interface)\\s+([A-Za-z_][A-Za-z0-9_]*)",
"captures": {
"1": { "name": "keyword.declaration.type.dino" },
"2": { "name": "entity.name.type.dino" }
}
}
]
},
"keywords": {
"patterns": [
{ "name": "keyword.control.dino", "match": "\\b(if|else|for|in|step|match|return|break|continue)\\b" },
{ "name": "keyword.declaration.dino", "match": "\\b(func|var|const|import|struct|enum|interface|pub)\\b" },
{ "name": "storage.modifier.dino", "match": "\\b(shared|weak)\\b" }
]
},
"constants": {
"name": "constant.language.dino",
"match": "\\b(true|false|nil)\\b"
},
"numbers": {
"name": "constant.numeric.dino",
"match": "\\b[0-9][0-9_]*(?:\\.[0-9][0-9_]*)?\\b"
},
"types": {
"patterns": [
{
"name": "support.type.builtin.dino",
"match": "\\b(int|float|bool|char|string|error|map|i8|i16|i32|i64|u8|u16|u32|u64|f32|f64)\\b"
},
{ "name": "entity.name.type.dino", "match": "\\b[A-Z][A-Za-z0-9_]*\\b" }
]
},
"calls": {
"name": "entity.name.function.call.dino",
"match": "\\b[a-z_][A-Za-z0-9_]*(?=\\s*\\()"
},
"operators": {
"patterns": [
{ "name": "keyword.operator.arrow.dino", "match": "=>" },
{ "name": "keyword.operator.range.dino", "match": "\\.\\." },
{ "name": "keyword.operator.comparison.dino", "match": "==|!=|<=|>=|<|>" },
{ "name": "keyword.operator.logical.dino", "match": "&&|\\|\\||!" },
{ "name": "keyword.operator.assignment.dino", "match": "[-+*/%]?=" },
{ "name": "keyword.operator.arithmetic.dino", "match": "[-+*/%]" },
{ "name": "keyword.operator.optional.dino", "match": "\\?" }
]
}
}
}
+103
View File
@@ -0,0 +1,103 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "Rex",
"scopeName": "source.rex",
"patterns": [
{ "include": "#comments" },
{ "include": "#strings" },
{ "include": "#chars" },
{ "include": "#declarations" },
{ "include": "#keywords" },
{ "include": "#constants" },
{ "include": "#numbers" },
{ "include": "#types" },
{ "include": "#calls" },
{ "include": "#operators" }
],
"repository": {
"comments": {
"patterns": [
{ "name": "comment.line.double-slash.rex", "match": "//.*$" },
{ "name": "comment.block.rex", "begin": "/\\*", "end": "\\*/" }
]
},
"strings": {
"name": "string.quoted.double.rex",
"begin": "\"",
"end": "\"",
"patterns": [
{ "name": "constant.character.escape.rex", "match": "\\\\." },
{
"name": "meta.interpolation.rex",
"begin": "\\{",
"end": "\\}",
"beginCaptures": { "0": { "name": "punctuation.section.interpolation.begin.rex" } },
"endCaptures": { "0": { "name": "punctuation.section.interpolation.end.rex" } },
"patterns": [{ "include": "$self" }]
}
]
},
"chars": {
"name": "string.quoted.single.rex",
"match": "'(?:\\\\.|[^'\\\\])'",
"captures": {}
},
"declarations": {
"patterns": [
{
"match": "\\b(func)\\s+([A-Za-z_][A-Za-z0-9_]*)",
"captures": {
"1": { "name": "keyword.declaration.function.rex" },
"2": { "name": "entity.name.function.rex" }
}
},
{
"match": "\\b(struct|enum|interface)\\s+([A-Za-z_][A-Za-z0-9_]*)",
"captures": {
"1": { "name": "keyword.declaration.type.rex" },
"2": { "name": "entity.name.type.rex" }
}
}
]
},
"keywords": {
"patterns": [
{ "name": "keyword.control.rex", "match": "\\b(if|else|for|in|step|match|return|break|continue)\\b" },
{ "name": "keyword.declaration.rex", "match": "\\b(func|var|const|import|struct|enum|interface|pub)\\b" },
{ "name": "storage.modifier.rex", "match": "\\b(shared|weak)\\b" }
]
},
"constants": {
"name": "constant.language.rex",
"match": "\\b(true|false|nil)\\b"
},
"numbers": {
"name": "constant.numeric.rex",
"match": "\\b[0-9][0-9_]*(?:\\.[0-9][0-9_]*)?\\b"
},
"types": {
"patterns": [
{
"name": "support.type.builtin.rex",
"match": "\\b(int|float|bool|char|string|error|map|i8|i16|i32|i64|u8|u16|u32|u64|f32|f64)\\b"
},
{ "name": "entity.name.type.rex", "match": "\\b[A-Z][A-Za-z0-9_]*\\b" }
]
},
"calls": {
"name": "entity.name.function.call.rex",
"match": "\\b[a-z_][A-Za-z0-9_]*(?=\\s*\\()"
},
"operators": {
"patterns": [
{ "name": "keyword.operator.arrow.rex", "match": "=>" },
{ "name": "keyword.operator.range.rex", "match": "\\.\\." },
{ "name": "keyword.operator.comparison.rex", "match": "==|!=|<=|>=|<|>" },
{ "name": "keyword.operator.logical.rex", "match": "&&|\\|\\||!" },
{ "name": "keyword.operator.assignment.rex", "match": "[-+*/%]?=" },
{ "name": "keyword.operator.arithmetic.rex", "match": "[-+*/%]" },
{ "name": "keyword.operator.optional.rex", "match": "\\?" }
]
}
}
}