Compare commits
No commits in common. "5032e2aabbe99883739add575684d7a10bee8651" and "6b4c82668086b1d5d244c82362902b7f63fdfeb9" have entirely different histories.
5032e2aabb
...
6b4c826680
17
README.md
17
README.md
@ -11,21 +11,15 @@ These functions are responsible for the library's "life time".
|
||||
|
||||
|
||||
```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
|
||||
```
|
||||
This function matches _string_ against all known highlighting rules and dispatches the appropriate callback depending on _mode_.
|
||||
|
||||
|
||||
```C
|
||||
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);
|
||||
#define HLPATH //?!
|
||||
```
|
||||
Fit a specific token against a string. `render_string()` uses this function internally.
|
||||
Coma separated list of directories to be searched for syntax scripts. `#undef` to disable it entirely.
|
||||
|
||||
|
||||
```C
|
||||
@ -88,12 +82,7 @@ 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_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);
|
||||
int new_syntax_character_tokens(const char * const chars, hl_group_t * const g);
|
||||
```
|
||||
|
||||
|
||||
|
11
TODO.md
11
TODO.md
@ -1,11 +0,0 @@
|
||||
[ ] script lexer
|
||||
[ ] xighlight like all-in-one wrapper for the lexer
|
||||
[ ] make init() lex #ifdef HLPATH
|
||||
[ ] $HLPATH traversing
|
||||
[ ] cli parser
|
||||
[ ] jeger segfault
|
||||
[ ] replace assert checks (long jump and set errno)
|
||||
[ ] token\_table\_t, functions to manage them and modification to existing funtions taking the global for granted
|
||||
[ ] do we fucking need keysymbol?
|
||||
[ ] new_symbol_tokens() and new_char_tokens() are confusing
|
||||
[ ] figure out how to allow regex engine overridding
|
Loading…
Reference in New Issue
Block a user