Commit a626bea
committed
fix(parser): implement unicode escape sequence parsing for round-trip support
- Add \uXXXX parsing (4-digit hex unicode) in parseString()
- Add \xXX parsing (2-digit hex ascii) in parseString()
- Refactor parseString() to use explicit j increment for clarity
- Ensures parse(serialize(doc)) works with unicode characters
- Maintains symmetry between parsing and serialization
Fixes P0-2: Round-trip now works correctly with unicode1 parent 7311836 commit a626bea
3 files changed
+899
-682
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
| 41 | + | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| 117 | + | |
116 | 118 | | |
117 | 119 | | |
118 | 120 | | |
| 121 | + | |
119 | 122 | | |
120 | 123 | | |
121 | 124 | | |
| 125 | + | |
122 | 126 | | |
123 | 127 | | |
124 | 128 | | |
| 129 | + | |
125 | 130 | | |
126 | 131 | | |
127 | 132 | | |
| 133 | + | |
128 | 134 | | |
129 | 135 | | |
130 | 136 | | |
| 137 | + | |
131 | 138 | | |
132 | 139 | | |
133 | 140 | | |
| 141 | + | |
134 | 142 | | |
135 | 143 | | |
136 | 144 | | |
| 145 | + | |
137 | 146 | | |
138 | 147 | | |
139 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
140 | 178 | | |
141 | 179 | | |
142 | 180 | | |
143 | 181 | | |
| 182 | + | |
144 | 183 | | |
145 | 184 | | |
146 | | - | |
147 | 185 | | |
148 | 186 | | |
149 | 187 | | |
| |||
0 commit comments