mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 07:08:48 +00:00
Remove fmt dependency
This commit is contained in:
@@ -17,8 +17,6 @@ Marshal_Error :: union {
|
|||||||
io.Error,
|
io.Error,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
marshal :: proc(v: any, allocator := context.allocator) -> (data: []byte, err: Marshal_Error) {
|
marshal :: proc(v: any, allocator := context.allocator) -> (data: []byte, err: Marshal_Error) {
|
||||||
b := strings.make_builder(allocator)
|
b := strings.make_builder(allocator)
|
||||||
defer if err != nil || data == nil {
|
defer if err != nil || data == nil {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package json
|
package json
|
||||||
|
|
||||||
import "core:fmt"
|
|
||||||
import "core:mem"
|
import "core:mem"
|
||||||
import "core:math"
|
import "core:math"
|
||||||
import "core:reflect"
|
import "core:reflect"
|
||||||
@@ -306,7 +305,7 @@ unmarsal_value :: proc(p: ^Parser, v: any) -> (err: Unmarshal_Error) {
|
|||||||
unmarsal_expect_token :: proc(p: ^Parser, kind: Token_Kind, loc := #caller_location) -> Token {
|
unmarsal_expect_token :: proc(p: ^Parser, kind: Token_Kind, loc := #caller_location) -> Token {
|
||||||
prev := p.curr_token
|
prev := p.curr_token
|
||||||
err := expect_token(p, kind)
|
err := expect_token(p, kind)
|
||||||
fmt.assertf(condition = err == nil, fmt="unmarsal_expect_token: %v, got %v", args={kind, prev.kind}, loc=loc)
|
assert(err == nil, "unmarsal_expect_token")
|
||||||
return prev
|
return prev
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user