mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 09:10:08 +00:00
add comments
This commit is contained in:
parent
3e2205015a
commit
8cb1e63222
@ -33,6 +33,9 @@ pub struct Syntax {
|
||||
}
|
||||
|
||||
impl Syntax {
|
||||
// Constructors
|
||||
|
||||
/// Create new `Self`
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
syntax_set: SyntaxSet::load_defaults_newlines(),
|
||||
@ -40,6 +43,10 @@ impl Syntax {
|
||||
}
|
||||
}
|
||||
|
||||
// Actions
|
||||
|
||||
/// Apply `Syntect` highlight to new buffer returned,
|
||||
/// according to given `alt` and `source_code` content
|
||||
pub fn highlight(
|
||||
&self,
|
||||
source_code: &str,
|
||||
|
Loading…
x
Reference in New Issue
Block a user