]> git.xolatile.top Git - public-libhl.git/commitdiff
spec update
authoranon <anon@anon.anon>
Wed, 20 Sep 2023 06:50:57 +0000 (08:50 +0200)
committeranon <anon@anon.anon>
Wed, 20 Sep 2023 06:50:57 +0000 (08:50 +0200)
README.md

index f1e55e3e395d3c0a1353ff55219731cea825c4ac..2ce54d8a597b955b3f767028a21765f6a6d55ece 100644 (file)
--- a/README.md
+++ b/README.md
@@ -10,6 +10,12 @@ These functions are responsible for the library's "life time".
 `hl_deinit()` will ensure all occupied memory is freed.
 
 
+```C
+#define HLPATH ~/.local/hl/:~/.vim/syntax/
+```
+Coma separated list of directories to be searched for syntax scripts. `#undef` to disable it entirely.
+
+
 ```C
 void render_string(const char * const string, const char * const mode);        //XXX: rename
 ```
@@ -17,9 +23,9 @@ This function matches _string_ against all known highlighting rules and dispatch
 
 
 ```C
-#define HLPATH //?!
+int token_fits(const token_t * const token, const char * const to, const int string_offset, const bool is_start_of_line, int * match_offset);
 ```
-Coma separated list of directories to be searched for syntax scripts. `#undef` to disable it entirely.
+Fit a specific token against a string. `render_string()` uses this function internally.
 
 
 ```C
@@ -82,7 +88,12 @@ There are also convinience functions:
 ```C
 // NOTE: the return value is the number tokens successfully inserted
 int new_keyword_tokens(const char * const * words, hl_group_t * const g);      // _words_ must be NULL terminated
-int new_syntax_character_tokens(const char * const chars, hl_group_t * const g);
+int new_syntax_char_tokens(const char * const chars, hl_group_t * const g);
+token_t * new_symbol_token(const char * const c, hl_group_t * const g);
+int new_symbol_tokens(const char * const * symbols, hl_group_t * const g);
+int new_char_tokens(const char * str, hl_group_t * const g);
+token_t * new_keyword_token(const char * const word, hl_group_t * const g);
+token_t * new_region_token(const char * start, const char * end, hl_group_t * g);
 ```