|
ze
|

Files | |
| file | syntax.c |
| Syntax highlighting engine implementation. | |
Functions | |
| int | is_separator (int c) |
| Determine whether a byte is a token separator for highlighting. | |
| void | editorUpdateSyntax (erow *row) |
| Compute highlighting for a row based on current filetype. | |
| int | editorSyntaxToColor (int hl) |
| Map a highlight class to an ANSI color code. | |
| void | editorSelectSyntaxHighlight (void) |
Select appropriate language rules based on E.filename. | |
| void editorSelectSyntaxHighlight | ( | void | ) |
Select appropriate language rules based on E.filename.
Sets E.syntax to a matching entry in HLDB by extension or substring, and recomputes highlighting for all rows.
E.syntax may change; row highlights are updated accordingly. | int editorSyntaxToColor | ( | int | hl | ) |
Map a highlight class to an ANSI color code.
| [in] | hl | One of HL_* constants. |
| void editorUpdateSyntax | ( | erow * | row | ) |
Compute highlighting for a row based on current filetype.
Updates row->hl based on the current filetype rules in E.syntax, marking comments, strings, numbers, and keywords. Propagates multi-line comment state to the following row when it changes.
| [in,out] | row | Row whose render buffer has been prepared. |
| int is_separator | ( | int | c | ) |
Determine whether a byte is a token separator for highlighting.
Separators include whitespace, NUL, and common punctuation.
| [in] | c | Byte value to test. |
c is a separator; 0 otherwise.