26 lines
889 B
Rust
26 lines
889 B
Rust
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([
|
|
",", ";", ".", ":", "=", "+", "-", "*", "/", "%", "&", "|", "^", "~",
|
|
"!", "?", "<", ">", "<<", ">>", "==", "!=", "<=", ">=", "&&", "||",
|
|
]),
|
|
}
|
|
}
|
|
}
|