Attribute value quote rules
This commit is contained in:
parent
4c311819cc
commit
4d5121a55d
|
@ -0,0 +1,20 @@
|
|||
#ifndef _HDR_HYPERBUILD_RULE_ATTRVALQUOTE
|
||||
#define _HDR_HYPERBUILD_RULE_ATTRVALQUOTE
|
||||
|
||||
#include "../../ext/nicehash/set/int32.h"
|
||||
#include "../../util/hbchar.h"
|
||||
#include "./c0.c"
|
||||
|
||||
static nh_set_int32_t hb_r_attrvalquote_set;
|
||||
|
||||
void hb_r_attrvalquote_init(void) {
|
||||
hb_r_attrvalquote_set = nh_set_int32_create();
|
||||
nh_set_int32_add(hb_r_attrvalquote_set, '\'');
|
||||
nh_set_int32_add(hb_r_attrvalquote_set, '"');
|
||||
}
|
||||
|
||||
int hb_r_attrvalquote_check(hb_char_t c) {
|
||||
return !nh_set_int32_has(hb_r_attrvalquote_set, c);
|
||||
}
|
||||
|
||||
#endif // _HDR_HYPERBUILD_RULE_ATTRVALQUOTE
|
|
@ -2,6 +2,7 @@
|
|||
#define _HDR_HYPERBUILD_RULE_INIT
|
||||
|
||||
#include "./char/attrname.c"
|
||||
#include "./char/attrvalquote.c"
|
||||
#include "./char/c0.c"
|
||||
#include "./char/digit.c"
|
||||
#include "./char/lcalpha.c"
|
||||
|
@ -31,6 +32,7 @@ void hb_r_init(void) {
|
|||
hb_r_attrname_init();
|
||||
|
||||
// Values
|
||||
hb_r_attrvalquote_init();
|
||||
hb_r_unquotedattrval_init();
|
||||
hb_r_entityrefs_init();
|
||||
|
||||
|
|
Loading…
Reference in New Issue