Change label syntax for for and match from #label name to name:

This commit is contained in:
Ginger Bill
2017-05-28 15:01:39 +01:00
parent 80c034ec7c
commit d3f63e5903
3 changed files with 60 additions and 102 deletions
+5 -5
View File
@@ -561,10 +561,10 @@ _write_int :: proc(fi: ^FmtInfo, u: u64, base: int, is_signed: bool, bit_size: i
}
buf: [256]byte;
flags: strconv.Int_Flag;
if fi.hash { flags |= strconv.Int_Flag.PREFIX; }
if fi.plus { flags |= strconv.Int_Flag.PLUS; }
if fi.space { flags |= strconv.Int_Flag.SPACE; }
flags: strconv.IntFlag;
if fi.hash { flags |= strconv.IntFlag.PREFIX; }
if fi.plus { flags |= strconv.IntFlag.PLUS; }
if fi.space { flags |= strconv.IntFlag.SPACE; }
s := strconv.append_bits(buf[0..<0], u, base, is_signed, bit_size, digits, flags);
prev_zero := fi.zero;
@@ -1089,7 +1089,7 @@ sbprintf :: proc(b: ^StringBuffer, fmt: string, args: ..any) -> string {
// Process a "verb"
i++;
#label prefix_loop
prefix_loop:
for ; i < end; i++ {
match fmt[i] {
case '+':
+1 -1
View File
@@ -41,7 +41,7 @@ RTLD_FIRST :: 0x100;
args: [dynamic]string;
FileTime :: struct #ordered {
_FileTime :: struct #ordered {
seconds: i64,
nanoseconds: i64
}