Skip to content

Commit

Permalink
fix(int_repr): couldn't parse 0 xd
Browse files Browse the repository at this point in the history
  • Loading branch information
MilkeeyCat committed Jun 2, 2024
1 parent 6bffd7c commit d0319c9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/parser/expr/int_repr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ impl TryFrom<&str> for IntLitRepr {
type Error = IntLitReprError;

fn try_from(value: &str) -> Result<Self, Self::Error> {
let mut int_repr = Self::default();
let mut int_repr = Self {
signed: false,
bytes: vec![0],
};
let mut result = value.to_owned();

for i in 0.. {
Expand Down

0 comments on commit d0319c9

Please sign in to comment.