Declaration grouping uses () rather than {}; Fix some problem with compilation on *nix

This commit is contained in:
Ginger Bill
2017-06-17 12:01:53 +01:00
parent 3fa398ec43
commit 2deb2f8eeb
32 changed files with 195 additions and 197 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
const {
const (
RUNE_ERROR = '\ufffd';
RUNE_SELF = 0x80;
RUNE_BOM = 0xfeff;
@@ -28,11 +28,11 @@ const {
// The default lowest and highest continuation byte.
LOCB = 0b1000_0000;
HICB = 0b1011_1111;
}
)
type AcceptRange struct { lo, hi: u8 }
let {
let (
accept_ranges = [5]AcceptRange{
{0x80, 0xbf},
{0xa0, 0xbf},
@@ -60,7 +60,7 @@ let {
0x13, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x23, 0x03, 0x03, // 0xe0-0xef
0x34, 0x04, 0x04, 0x04, 0x44, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, // 0xf0-0xff
};
}
)
proc encode_rune(r: rune) -> ([4]u8, int) {
var buf: [4]u8;