Unquoted attribute value rules

This commit is contained in:
Wilson Lin 2018-07-04 00:17:52 +12:00
parent 33d6991eb6
commit 0626dd92ba
1 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,24 @@
#ifndef _HDR_HYPERBUILD_RULE_UNQUOTEDATTRVAL
#define _HDR_HYPERBUILD_RULE_UNQUOTEDATTRVAL
#include "../../ext/nicehash/src/main/c/set/int32.h"
#include "./whitespace.c"
static nh_set_int32_t hb_r_unquotedattrval_set;
void hb_r_unquotedattrval_init() {
hb_r_unquotedattrval_set = nh_set_int32_create();
hb_r_whitespace_add_elems(hb_r_unquotedattrval_set);
nh_set_int32_add(hb_r_unquotedattrval_set, '"');
nh_set_int32_add(hb_r_unquotedattrval_set, '\'');
nh_set_int32_add(hb_r_unquotedattrval_set, '`');
nh_set_int32_add(hb_r_unquotedattrval_set, '=');
nh_set_int32_add(hb_r_unquotedattrval_set, '<');
nh_set_int32_add(hb_r_unquotedattrval_set, '>');
}
int hb_r_unquotedattrval_check(char c) {
return nh_set_int32_has(hb_r_unquotedattrval_set, c);
}
#endif // _HDR_HYPERBUILD_RULE_UNQUOTEDATTRVAL