Syntax highlighting helper functions. More...
Functions | |
| Elm_Code_Syntax * | elm_code_syntax_for_mime_get (const char *mime) |
| Lookup a syntax definition from a mime type. More... | |
| void | elm_code_syntax_parse_line (Elm_Code_Syntax *syntax, Elm_Code_Line *line) |
| Parse a line and apply the syntax definition by inserting Elm_Code_Token into the line. More... | |
| void | elm_code_syntax_parse_file (Elm_Code_Syntax *syntax, Elm_Code_File *file) |
| Parse a file and apply the syntax definition one line at a time. More... | |
Syntax highlighting helper functions.
Syntax functions for adding syntax highlighting to elm code.
| Elm_Code_Syntax* elm_code_syntax_for_mime_get | ( | const char * | mime | ) |
Lookup a syntax definition from a mime type.
If there is no syntax known NULL will be returned.
| mime | The mime type to be looked up for a matching syntax definition |
| void elm_code_syntax_parse_line | ( | Elm_Code_Syntax * | syntax, |
| Elm_Code_Line * | line | ||
| ) |
Parse a line and apply the syntax definition by inserting Elm_Code_Token into the line.
| syntax | The syntax definition to use (from elm_code_syntax_for_mime_get) |
| line | The line that contains the content to parse and will receive the tokens |
| void elm_code_syntax_parse_file | ( | Elm_Code_Syntax * | syntax, |
| Elm_Code_File * | file | ||
| ) |
Parse a file and apply the syntax definition one line at a time.
| syntax | The syntax definition to use (from elm_code_syntax_for_mime_get) |
| file | The file to parse - each line in the file will be processed |