modified editor to include syntax for .dsc files
This commit is contained in:
@@ -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,5 +1,6 @@
|
||||
#![allow(dead_code)]
|
||||
pub mod dsa;
|
||||
pub mod dsc;
|
||||
|
||||
use std::collections::BTreeSet;
|
||||
use std::hash::{Hash, Hasher};
|
||||
|
||||
Reference in New Issue
Block a user