mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-12 14:23:33 +00:00
Merge branch 'master' of https://github.com/odin-lang/Odin
This commit is contained in:
@@ -264,7 +264,7 @@ scan_comment :: proc(t: ^Tokenizer) -> (comment: string, err: Error) {
|
||||
expect(t, .Dash)
|
||||
expect(t, .Gt)
|
||||
|
||||
return string(t.src[offset : t.offset - 1]), .None
|
||||
return string(t.src[offset : t.offset - 3]), .None
|
||||
}
|
||||
|
||||
// Skip CDATA
|
||||
|
||||
@@ -294,7 +294,7 @@ parse_bytes :: proc(data: []u8, options := DEFAULT_OPTIONS, path := "", error_ha
|
||||
comment := scan_comment(t) or_return
|
||||
|
||||
if .Intern_Comments in opts.flags {
|
||||
if len(doc.elements) == 0 {
|
||||
if doc.element_count == 0 {
|
||||
append(&doc.comments, comment)
|
||||
} else {
|
||||
el := new_element(doc)
|
||||
|
||||
@@ -840,6 +840,15 @@ gb_global TargetMetrics target_freestanding_amd64_win64 = {
|
||||
TargetABI_Win64,
|
||||
};
|
||||
|
||||
gb_global TargetMetrics target_freestanding_amd64_mingw = {
|
||||
TargetOs_freestanding,
|
||||
TargetArch_amd64,
|
||||
8, 8, AMD64_MAX_ALIGNMENT, 32,
|
||||
str_lit("x86_64-pc-windows-gnu"),
|
||||
TargetABI_Win64,
|
||||
};
|
||||
|
||||
|
||||
gb_global TargetMetrics target_freestanding_arm64 = {
|
||||
TargetOs_freestanding,
|
||||
TargetArch_arm64,
|
||||
@@ -902,6 +911,7 @@ gb_global NamedTargetMetrics named_targets[] = {
|
||||
|
||||
{ str_lit("freestanding_amd64_sysv"), &target_freestanding_amd64_sysv },
|
||||
{ str_lit("freestanding_amd64_win64"), &target_freestanding_amd64_win64 },
|
||||
{ str_lit("freestanding_amd64_mingw"), &target_freestanding_amd64_mingw },
|
||||
|
||||
{ str_lit("freestanding_arm64"), &target_freestanding_arm64 },
|
||||
{ str_lit("freestanding_arm32"), &target_freestanding_arm32 },
|
||||
|
||||
@@ -114,7 +114,7 @@ xml_test_entities :: proc(t: ^testing.T) {
|
||||
},
|
||||
expected_doctype = "html",
|
||||
},
|
||||
crc32 = 0x48f41216,
|
||||
crc32 = 0x98791215,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ xml_test_entities_unbox :: proc(t: ^testing.T) {
|
||||
},
|
||||
expected_doctype = "html",
|
||||
},
|
||||
crc32 = 0xd0567818,
|
||||
crc32 = 0x5fd5ab4e,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ xml_test_entities_unbox_decode :: proc(t: ^testing.T) {
|
||||
},
|
||||
expected_doctype = "html",
|
||||
},
|
||||
crc32 = 0x6e45a697,
|
||||
crc32 = 0xda1ac384,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -298,4 +298,4 @@ doc_to_string :: proc(doc: ^xml.Document) -> (result: string) {
|
||||
|
||||
print(strings.to_writer(&buf), doc)
|
||||
return strings.clone(strings.to_string(buf))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user