From 1f5ab0b5f134ceb33ec97578a4c899fe03eed28e Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Mon, 4 Mar 2019 13:41:47 +0100 Subject: Fix typo in `cel` tokeniser. --- core/encoding/cel/token.odin | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'core/encoding/cel/token.odin') diff --git a/core/encoding/cel/token.odin b/core/encoding/cel/token.odin index 46c8d61be..9c3bdf715 100644 --- a/core/encoding/cel/token.odin +++ b/core/encoding/cel/token.odin @@ -78,7 +78,7 @@ Token :: struct { } Tokenizer :: struct { - src: []byte, + src: []byte, file: string, // May not be used @@ -281,7 +281,7 @@ digit_value :: proc(r: rune) -> int { } scan_number :: proc(t: ^Tokenizer, seen_decimal_point: bool) -> (Kind, string) { - scan_manitissa :: proc(t: ^Tokenizer, base: int) { + scan_mantissa :: proc(t: ^Tokenizer, base: int) { for digit_value(t.curr_rune) < base || t.curr_rune == '_' { advance_to_next_rune(t); } @@ -294,7 +294,7 @@ scan_number :: proc(t: ^Tokenizer, seen_decimal_point: bool) -> (Kind, string) { advance_to_next_rune(t); } if digit_value(t.curr_rune) < 10 { - scan_manitissa(t, 10); + scan_mantissa(t, 10); } else { token_error(t, "Illegal floating point exponent"); } @@ -305,7 +305,7 @@ scan_number :: proc(t: ^Tokenizer, seen_decimal_point: bool) -> (Kind, string) { if t.curr_rune == '.' { tok = Float; advance_to_next_rune(t); - scan_manitissa(t, 10); + scan_mantissa(t, 10); } return scan_exponent(t, tok, offset); @@ -317,7 +317,7 @@ scan_number :: proc(t: ^Tokenizer, seen_decimal_point: bool) -> (Kind, string) { if seen_decimal_point { offset -= 1; tok = Float; - scan_manitissa(t, 10); + scan_mantissa(t, 10); return scan_exponent(t, tok, offset); } @@ -327,24 +327,24 @@ scan_number :: proc(t: ^Tokenizer, seen_decimal_point: bool) -> (Kind, string) { switch t.curr_rune { case 'b', 'B': advance_to_next_rune(t); - scan_manitissa(t, 2); + scan_mantissa(t, 2); if t.offset - offset <= 2 { token_error(t, "Illegal binary number"); } case 'o', 'O': advance_to_next_rune(t); - scan_manitissa(t, 8); + scan_mantissa(t, 8); if t.offset - offset <= 2 { token_error(t, "Illegal octal number"); } case 'x', 'X': advance_to_next_rune(t); - scan_manitissa(t, 16); + scan_mantissa(t, 16); if t.offset - offset <= 2 { token_error(t, "Illegal hexadecimal number"); } case: - scan_manitissa(t, 10); + scan_mantissa(t, 10); switch t.curr_rune { case '.', 'e', 'E': return scan_fraction(t, tok, offset); @@ -354,7 +354,7 @@ scan_number :: proc(t: ^Tokenizer, seen_decimal_point: bool) -> (Kind, string) { return tok, string(t.src[offset:t.offset]); } - scan_manitissa(t, 10); + scan_mantissa(t, 10); return scan_fraction(t, tok, offset); } -- cgit v1.2.3