Strip semicolons; Make odin strip-semicolon replace .. with ..= if used as a binary operator

This commit is contained in:
gingerBill
2021-09-06 20:15:59 +01:00
parent 3bf005bfc5
commit 0434281f73
21 changed files with 999 additions and 968 deletions
+22 -22
View File
@@ -41,17 +41,17 @@ accept_ranges := [5]Accept_Range{
}
accept_sizes := [256]u8{
0x00..0x7f = 0xf0,
0x80..0xc1 = 0xf1,
0xc2..0xdf = 0x02,
0xe0 = 0x13,
0xe1..0xec = 0x03,
0xed = 0x23,
0xee..0xef = 0x03,
0xf0 = 0x34,
0xf1..0xf3 = 0x04,
0xf4 = 0x44,
0xf5..0xff = 0xf1,
0x00..=0x7f = 0xf0,
0x80..=0xc1 = 0xf1,
0xc2..=0xdf = 0x02,
0xe0 = 0x13,
0xe1..=0xec = 0x03,
0xed = 0x23,
0xee..=0xef = 0x03,
0xf0 = 0x34,
0xf1..=0xf3 = 0x04,
0xf4 = 0x44,
0xf5..=0xff = 0xf1,
}
encode_rune :: proc(c: rune) -> ([4]u8, int) {
@@ -379,15 +379,15 @@ full_rune_in_string :: proc(s: string) -> bool {
_first := [256]u8{
0x00..0x7f = 0xf0, // ascii, size 1
0x80..0xc1 = 0xf1, // invalid, size 1
0xc2..0xdf = 0x02, // accept 1, size 2
0xe0 = 0x13, // accept 1, size 3
0xe1..0xec = 0x03, // accept 0, size 3
0xed = 0x23, // accept 2, size 3
0xee..0xef = 0x03, // accept 0, size 3
0xf0 = 0x34, // accept 3, size 4
0xf1..0xf3 = 0x04, // accept 0, size 4
0xf4 = 0x44, // accept 4, size 4
0xf5..0xff = 0xf1, // ascii, size 1
0x00..=0x7f = 0xf0, // ascii, size 1
0x80..=0xc1 = 0xf1, // invalid, size 1
0xc2..=0xdf = 0x02, // accept 1, size 2
0xe0 = 0x13, // accept 1, size 3
0xe1..=0xec = 0x03, // accept 0, size 3
0xed = 0x23, // accept 2, size 3
0xee..=0xef = 0x03, // accept 0, size 3
0xf0 = 0x34, // accept 3, size 4
0xf1..=0xf3 = 0x04, // accept 0, size 4
0xf4 = 0x44, // accept 4, size 4
0xf5..=0xff = 0xf1, // ascii, size 1
}