mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-25 12:24:57 +00:00
Fix strconv.parse_ usage across other packages
This commit is contained in:
@@ -427,11 +427,13 @@ parse_operand :: proc(p: ^Parser) -> (Value, Pos) {
|
||||
|
||||
case .Integer:
|
||||
next_token(p);
|
||||
return strconv.parse_i64(tok.lit), tok.pos;
|
||||
i, _ := strconv.parse_i64(tok.lit);
|
||||
return i, tok.pos;
|
||||
|
||||
case .Float:
|
||||
next_token(p);
|
||||
return strconv.parse_f64(tok.lit), tok.pos;
|
||||
f, _ := strconv.parse_f64(tok.lit);
|
||||
return f, tok.pos;
|
||||
|
||||
case .String:
|
||||
next_token(p);
|
||||
|
||||
@@ -85,11 +85,13 @@ parse_value :: proc(p: ^Parser) -> (value: Value, err: Error) {
|
||||
return;
|
||||
|
||||
case Kind.Integer:
|
||||
value.value = Integer(strconv.parse_i64(token.text));
|
||||
i, _ := strconv.parse_i64(token.text);
|
||||
value.value = Integer(i);
|
||||
advance_token(p);
|
||||
return;
|
||||
case Kind.Float:
|
||||
value.value = Float(strconv.parse_f64(token.text));
|
||||
f, _ := strconv.parse_f64(token.text);
|
||||
value.value = Float(f);
|
||||
advance_token(p);
|
||||
return;
|
||||
case Kind.String:
|
||||
|
||||
Reference in New Issue
Block a user