rustyphoenixlecture 1.7.2

This project aims to provide a simple a powerfull lecture compilation to generate html web sites

[highlighting]
# Do we want line numbers
is_line_number = true
# Plain text identifier
token_charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"
# Vector of accepted extensions
vec_extention = ["rs"]
# Vector of accepted filenames for highlithing this particular language
vec_filename = []
# Definition of a single line comment
single_line_comment = "//"
# Beginning of a multi-line comment
multi_line_comment_begin = "/*"
# Ending of a multi-line comment
multi_line_comment_end = "*/"
# If the language has an escape char
is_escape_char = true
# Some example of the language to be parsed
example = """
///Shadok example
#[derive(Debug,Default)]
pub struct Shadok {
	///Name of the Shadok
	name: String,
	///Age of the Shadok
	age: usize,
}

fn main() {
	let shadok: Shadok = Default::default();
	println!("Shadok = {:?}", shadok);
	another_macro!(shadok);
}
"""

[[keyword]]
style = "dsKeyword"
vec_token = [
	"let",
	"mut",
	"const",
	"use",
	"struct",
	"impl",
	"where",
	"mod",
	"super",
	"crate",
	"extern",
	"default",
	"unsafe",
	"pub",
	"trait",
	"type",
	"dyn",
	"self",
	"sizeof",
	"as",
	"fn",
	"in",
]
vec_match = []

[[keyword]]
style = "rustControlFlow"
vec_token = [
	"for",
	"while",
	"if",
	"else",
	"match",
	"return",
]
vec_match = []

[[keyword]]
style = "dsType"
vec_token = [
	"String",
	"u8",
	"u16",
	"u32",
	"u64",
	"u128",
	"usize",
	"i8",
	"i16",
	"i32",
	"i64",
	"i128",
	"isize",
	"f32",
	"f64",
	"bool",
	"char",
	"Vec",
	"str",
	"Self",
]
vec_match = []

[[keyword]]
style = "rustKeyType"
vec_token = [
	"Iterator",
	"AddAssign",
	"Copy",
	"Default",
	"Debug",
	"Value",
	"Result",
	"Hash",
	"Clone",
	"PartialOrd",
	"PartialEq",
	"Ord",
	"Eq",
	"Read",
	"Write",
	"Add",
	"Iter",
	"Sized",
	"ToOwned",
	"Error",
]
vec_match = []

[[keyword]]
style = "rustBuiltinFunction"
vec_token = []
vec_match = ["..=",
	"..",
	":",
	"{",
	"}",
	"?",
	"$",
	"=",
	"<",
	"=>",
	"->",
	">",
	"&",
	";",
]

[[keyword]]
style = "rustReturnMacro"
vec_token = [
	"Ok",
	"Err",
]
vec_match = []

[[keyword]]
style = "rustFunction"
vec_token = [
	"Some",
]
vec_match = []

[[keyword]]
style = "rustStandardFunction"
vec_token = [
	"into_iter",
	"into_par_iter",
	"next",
	"skip",
	"step_by",
	"chain",
	"take",
	"enumerate",
	"to_owned",
	"zip",
	"map",
	"to_le_bytes",
	"from_le_bytes",
	"read",
	"write",
	"create",
	"open",
	"to_string",
	"unwrap",
	"parse",
	"collect",
	"lines",
	"expect",
	"new",
	"from",
	"push",
	"reserve",
	"len",
	"iter_mut",
	"iter",
	"chars",
]
vec_match = []


[[getuntil]]
style = "dsString"
start_token = "\""
end_token = "\""


[[getuntil]]
style = "cppmacro"
start_token = "#"
end_token = "\n"


[[getuntil]]
style = "dsCommentMono"
start_token = "////"
end_token = "\n"


[[getuntil]]
style = "dsCommentMulti"
start_token = "/***"
end_token = "*/"


[[getuntil]]
style = "dsDocMono"
start_token = "///"
end_token = "\n"


[[getuntil]]
style = "dsDocMulti"
start_token = "/**"
end_token = "*/"


[[getuntil]]
style = "dsCommentMono"
start_token = "//"
end_token = "\n"


[[getuntil]]
style = "dsCommentMulti"
start_token = "/*"
end_token = "*/"


[[sequence]]
style = "dsNumber"
vec_step = [
	{oneof = "1234567890"},
	{oneof = "lu"}
]

[[sequence]]
style = "dsNumber"
vec_step = [
	{token = "."},
	{oneof = "1234567890"},
	{oneof = "f"}
]

[[sequence]]
style = "dsNumber"
vec_step = [
	{token = "0x"},
	{oneof = "1234567890abcdef"},
]

[[sequence]]
style = "dsNumber"
vec_step = [
	{token = "0b"},
	{oneof = "10"},
]

# We have to fight token with token, because oneof has less priority
[[sequence]]
style = "dsNumber"
vec_step = [
	{token = "0"},
]

[[sequence]]
style = "rustBuiltinFunction"
vec_step = [
	{oneof = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"},
	{token = "!"},
]

[[sequence]]
style = "rustBuiltinFunction"
vec_step = [
	{oneof = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"},
	{keyword = "::"},
]