src/codegens.h

changeset 46
534a4ef4143d
parent 45
1f3835182aeb
child 47
c39ecbbca7c0
     1.1 --- a/src/codegens.h	Tue Aug 23 15:28:56 2016 +0200
     1.2 +++ b/src/codegens.h	Tue Aug 23 15:55:02 2016 +0200
     1.3 @@ -39,21 +39,15 @@
     1.4  
     1.5  #define WORDBUF_SIZE 64
     1.6  
     1.7 -#define iswordcharacter(c) (isalnum(c) || c=='_' || c=='#' || c=='@')
     1.8 -    
     1.9 -typedef struct _highlighter_t highlighter_t;
    1.10 -typedef void(*parser_fnc)(char*,UcxBuffer*,highlighter_t*);
    1.11 -
    1.12 -struct _highlighter_t {
    1.13 -    const char** keywords;
    1.14 -    int(*istype)(char*,size_t);
    1.15 -    int(*isdirective)(char*);
    1.16 -    parser_fnc parser;
    1.17 +typedef struct {
    1.18      int iscommentml;
    1.19      char word[WORDBUF_SIZE];
    1.20      char includefile[FILENAME_MAX];
    1.21 -};
    1.22 +} HighlighterData;
    1.23  
    1.24 +typedef void(*highlighter_func)(char*,UcxBuffer*,HighlighterData*);
    1.25 +
    1.26 +#define iswordcharacter(c) (isalnum(c) || c=='_' || c=='#' || c=='@')
    1.27  size_t writeescapedchar(char *dest, size_t dp, char c);
    1.28  int check_keyword(char *word, const char** keywords);
    1.29  int check_capsonly(char *word, size_t wp);

mercurial