mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 23:58:50 +00:00
Fix generation for unicode entities
This commit is contained in:
+4816
-4816
File diff suppressed because it is too large
Load Diff
@@ -142,7 +142,7 @@ generate_encoding_entity_table :: proc() {
|
|||||||
/*
|
/*
|
||||||
Generate table.
|
Generate table.
|
||||||
*/
|
*/
|
||||||
fmt.wprintln(w, "package unicode_entity")
|
fmt.wprintln(w, "package encoding_unicode_entity")
|
||||||
fmt.wprintln(w, "")
|
fmt.wprintln(w, "")
|
||||||
fmt.wprintln(w, GENERATED)
|
fmt.wprintln(w, GENERATED)
|
||||||
fmt.wprintln(w, "")
|
fmt.wprintln(w, "")
|
||||||
@@ -195,12 +195,12 @@ named_xml_entity_to_rune :: proc(name: string) -> (decoded: rune, ok: bool) {
|
|||||||
|
|
||||||
e := entity_map[v]
|
e := entity_map[v]
|
||||||
|
|
||||||
fmt.wprintf(w, "\t\t\tcase \"%v\":", e.name)
|
fmt.wprintf(w, "\t\tcase \"%v\":", e.name)
|
||||||
for i := len(e.name); i < max_name_length; i += 1 {
|
for i := len(e.name); i < max_name_length; i += 1 {
|
||||||
fmt.wprintf(w, " ")
|
fmt.wprintf(w, " ")
|
||||||
}
|
}
|
||||||
fmt.wprintf(w, " // %v\n", e.description)
|
fmt.wprintf(w, " // %v\n", e.description)
|
||||||
fmt.wprintf(w, "\t\t\t\treturn %v, true\n", rune_to_string(e.codepoint))
|
fmt.wprintf(w, "\t\t\treturn %v, true\n", rune_to_string(e.codepoint))
|
||||||
|
|
||||||
should_close = true
|
should_close = true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user