diff --git a/.gitignore b/.gitignore index edd913a..085276d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ target _build .mooncakes/ .DS_Store + +_build/ +target/ diff --git a/moon.pkg.json b/moon.pkg.json index 9e26dfe..9de829d 100644 --- a/moon.pkg.json +++ b/moon.pkg.json @@ -1 +1,6 @@ -{} \ No newline at end of file +{ + "import": [ + "moonbitlang/core/hashmap", + "moonbitlang/core/strconv" + ] +} diff --git a/parser.mbt b/parser.mbt index c8cf36b..17e0e7e 100644 --- a/parser.mbt +++ b/parser.mbt @@ -256,7 +256,7 @@ fn IniParseState::handle_value_char( state.left -= 1 if state.left == 0 { // it must be 4 digits hex - let code = (try? @strconv.parse_int(state.hex.to_string(), base=16)).unwrap() + let code = try! @strconv.parse_int(state.hex.to_string(), base=16) self.ctx.buffer.write_char(Int::unsafe_to_char(code)) self.escape_state = EscapeState::None self.last_char_is_backslash = false