diff --git a/src/dom/scanner.c b/src/dom/scanner.c index 51c3f28e6..10f5cc28a 100644 --- a/src/dom/scanner.c +++ b/src/dom/scanner.c @@ -153,8 +153,8 @@ init_dom_scanner_info(struct dom_scanner_info *scanner_info) } void -init_dom_scanner(struct dom_scanner *scanner, struct dom_scanner_info *scanner_info, - struct dom_string *string) +init_dom_scanner_state(struct dom_scanner *scanner, struct dom_scanner_info *scanner_info, + struct dom_string *string, int state) { if (!scanner_info->initialized) { init_dom_scanner_info(scanner_info); @@ -168,5 +168,6 @@ init_dom_scanner(struct dom_scanner *scanner, struct dom_scanner_info *scanner_i scanner->end = string->string + string->length; scanner->current = scanner->table; scanner->info = scanner_info; + scanner->state = state; scanner->info->scan(scanner); } diff --git a/src/dom/scanner.h b/src/dom/scanner.h index e22bf28e5..2dc9722cd 100644 --- a/src/dom/scanner.h +++ b/src/dom/scanner.h @@ -91,8 +91,11 @@ struct dom_scanner_info { /* Initializes the scanner. */ -void init_dom_scanner(struct dom_scanner *scanner, struct dom_scanner_info *scanner_info, - struct dom_string *string); +void init_dom_scanner_state(struct dom_scanner *scanner, struct dom_scanner_info *scanner_info, + struct dom_string *string, int state); + +#define init_dom_scanner(scanner, info, string) \ + init_dom_scanner_state(scanner, info, string, 0) /* The number of tokens in the scanners token table: * At best it should be big enough to contain properties with space separated