$darkmode
Herb C Reference
token_struct.h
Go to the documentation of this file.
1 #ifndef HERB_TOKEN_STRUCT_H
2 #define HERB_TOKEN_STRUCT_H
3 
4 #include "location.h"
5 #include "range.h"
6 
7 typedef enum {
9  TOKEN_NBSP, // \xC2\xA0
12 
13  TOKEN_HTML_DOCTYPE, // <!DOCTYPE, <!doctype, <!DoCtYpE, <!dOcTyPe
16  TOKEN_CDATA_START, // <![CDATA[
18 
23 
26 
27  TOKEN_ERB_START, // <%, <%=, <%%=, <%#, <%-, <%==, <%%
28  TOKEN_ERB_CONTENT, // Ruby Code
29  TOKEN_ERB_END, // %>, -%>, %%>
30 
31  TOKEN_LT, // <
34  TOKEN_QUOTE, // ", '
36  TOKEN_BACKSLASH, // backslash
37  TOKEN_DASH, // -
42  TOKEN_AT, // @
45 
49 } token_type_T;
50 
51 typedef struct TOKEN_STRUCT {
52  char* value;
57 
58 #endif
Definition: location.h:8
Definition: range.h:6
Definition: token_struct.h:51
range_T * range
Definition: token_struct.h:53
location_T * location
Definition: token_struct.h:54
char * value
Definition: token_struct.h:52
token_type_T type
Definition: token_struct.h:55
token_type_T
Definition: token_struct.h:7
@ TOKEN_BACKSLASH
Definition: token_struct.h:36
@ TOKEN_XML_DECLARATION
Definition: token_struct.h:14
@ TOKEN_CDATA_END
Definition: token_struct.h:17
@ TOKEN_EXCLAMATION
Definition: token_struct.h:39
@ TOKEN_NEWLINE
Definition: token_struct.h:10
@ TOKEN_ERB_END
Definition: token_struct.h:29
@ TOKEN_XML_DECLARATION_END
Definition: token_struct.h:15
@ TOKEN_BACKTICK
Definition: token_struct.h:35
@ TOKEN_CDATA_START
Definition: token_struct.h:16
@ TOKEN_HTML_TAG_END
Definition: token_struct.h:21
@ TOKEN_AT
Definition: token_struct.h:42
@ TOKEN_QUOTE
Definition: token_struct.h:34
@ TOKEN_ERB_CONTENT
Definition: token_struct.h:28
@ TOKEN_EQUALS
Definition: token_struct.h:33
@ TOKEN_IDENTIFIER
Definition: token_struct.h:11
@ TOKEN_SLASH
Definition: token_struct.h:32
@ TOKEN_HTML_TAG_START
Definition: token_struct.h:19
@ TOKEN_PERCENT
Definition: token_struct.h:43
@ TOKEN_CHARACTER
Definition: token_struct.h:46
@ TOKEN_NBSP
Definition: token_struct.h:9
@ TOKEN_COLON
Definition: token_struct.h:41
@ TOKEN_HTML_COMMENT_END
Definition: token_struct.h:25
@ TOKEN_EOF
Definition: token_struct.h:48
@ TOKEN_DASH
Definition: token_struct.h:37
@ TOKEN_LT
Definition: token_struct.h:31
@ TOKEN_AMPERSAND
Definition: token_struct.h:44
@ TOKEN_HTML_TAG_SELF_CLOSE
Definition: token_struct.h:22
@ TOKEN_HTML_TAG_START_CLOSE
Definition: token_struct.h:20
@ TOKEN_ERROR
Definition: token_struct.h:47
@ TOKEN_SEMICOLON
Definition: token_struct.h:40
@ TOKEN_HTML_COMMENT_START
Definition: token_struct.h:24
@ TOKEN_UNDERSCORE
Definition: token_struct.h:38
@ TOKEN_ERB_START
Definition: token_struct.h:27
@ TOKEN_WHITESPACE
Definition: token_struct.h:8
@ TOKEN_HTML_DOCTYPE
Definition: token_struct.h:13
struct TOKEN_STRUCT token_T