From 4feb59d831d395369aa21d77e9b9d293125421d1 Mon Sep 17 00:00:00 2001 From: mattkae Date: Fri, 23 Jun 2023 10:25:52 -0400 Subject: Able to parse double quoted HTML attributes --- src/code_point.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/code_point.h') diff --git a/src/code_point.h b/src/code_point.h index c039907..59afd75 100644 --- a/src/code_point.h +++ b/src/code_point.h @@ -2,6 +2,7 @@ #define CODE_POINT_H #include +#include typedef wchar_t code_point_t; @@ -26,6 +27,8 @@ namespace CodePoints { const code_point_t REPLACEMENT_CHAR = 0xFFFD; const code_point_t GREATER_THAN_SIGN = 0x003E; const code_point_t LESS_THAN_SIGN = 0x003C; + const code_point_t EQUALS_SIGN = 0x003D; + const code_point_t GRAVE_ACCENT = 0x0060; const code_point_t AMPERSAND = 0x0026; const code_point_t EXCLAMATION_MARK = 0x0021; const code_point_t NUMBER_SIGN = 0x0023; @@ -34,6 +37,9 @@ namespace CodePoints { const code_point_t DIGIT_ZERO = 0x0030; const code_point_t DIGIT_NINE = 0x0039; const code_point_t SEMICOLON = 0x003B; + const code_point_t QUOTATION_MARK = 0x0022; + const code_point_t APOSTROPHE = 0x0027; + const code_point_t MY_EOF = EOF; inline bool is_decimal(code_point_t c) { return c >= CodePoints::DIGIT_ZERO && c <= CodePoints::DIGIT_NINE; @@ -153,6 +159,10 @@ namespace CodePoints { out = c; return true; } + + inline code_point_t to_lower_case(code_point_t c) { + return c + 0x0020; + } }; #endif -- cgit v1.2.1