aboutsummaryrefslogtreecommitdiff
path: root/core/encoding
diff options
context:
space:
mode:
authorBrendan Punsky <bpunsky@gmail.com>2019-03-13 16:45:46 -0400
committerGitHub <noreply@github.com>2019-03-13 16:45:46 -0400
commiteadb66c9efc19ad1deaee6ca5a141cbd7206fcce (patch)
tree01eb1a33ffba203c45460e0e50da4b5f4ca31076 /core/encoding
parent9d7e1c17cc4a9b0d6cfd4c741c800b5732eb9948 (diff)
parentbdab5e00da6dee80b7582135815f2183def935bb (diff)
Merge branch 'master' into master
Diffstat (limited to 'core/encoding')
-rw-r--r--core/encoding/cel/token.odin20
1 files changed, 10 insertions, 10 deletions
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);
}