modified editor to include syntax for .dsc files

This commit is contained in:
2026-02-05 01:26:37 +00:00
parent b8abbfd02f
commit e69514e46e
4 changed files with 30 additions and 60 deletions
+25
View File
@@ -0,0 +1,25 @@
use super::Syntax;
use std::collections::BTreeSet;
impl Syntax {
pub fn dsc() -> Self {
Syntax {
language: "Damn Simple Code",
case_sensitive: false,
comment: "//",
comment_multiline: ["/*", "*/"],
hyperlinks: BTreeSet::from(["http"]),
keywords: BTreeSet::from([
"include", "fn", "let", "const", "static", "if", "else", "while", "for",
"break", "continue", "loop", "return",
]),
types: BTreeSet::from([
"u32", "u16", "u8", "i32", "i16", "i8", "str", "char", "bool", "void",
]),
special: BTreeSet::from([
",", ";", ".", ":", "=", "+", "-", "*", "/", "%", "&", "|", "^", "~",
"!", "?", "<", ">", "<<", ">>", "==", "!=", "<=", ">=", "&&", "||",
]),
}
}
}
+1
View File
@@ -1,5 +1,6 @@
#![allow(dead_code)]
pub mod dsa;
pub mod dsc;
use std::collections::BTreeSet;
use std::hash::{Hash, Hasher};