mirror of
https://github.com/logos-storage/nim-serde.git
synced 2026-01-02 13:43:06 +00:00
update license info
This commit is contained in:
parent
eadc7e2d16
commit
84943dbed9
@ -1,3 +1,6 @@
|
||||
# This file is a modified version of Emery Hemingway’s CBOR library for Nim,
|
||||
# originally available at https://github.com/ehmry/cbor-nim and released under The Unlicense.
|
||||
|
||||
import std/[math, streams, options, tables, strutils, times, typetraits]
|
||||
import ./types
|
||||
import ./helpers
|
||||
@ -134,16 +137,6 @@ func bytesLen*(c: CborParser): ?!int =
|
||||
return failure(newCborError("Expected bytes, got " & $c.kind))
|
||||
return success(c.intVal.int)
|
||||
|
||||
template tryNext(c: var CborParser) =
|
||||
let nextRes = c.next()
|
||||
if nextRes.isFailure:
|
||||
return failure(nextRes.error)
|
||||
|
||||
template trySkip(c: var CborParser) =
|
||||
let skipRes = c.skipNode()
|
||||
if skipRes.isFailure:
|
||||
return failure(skipRes.error)
|
||||
|
||||
proc nextBytes*(c: var CborParser; buf: var openArray[byte]): ?!void =
|
||||
## Read the bytes that the parser is positioned on and advance.
|
||||
try:
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
# This file is a modified version of Emery Hemingway’s CBOR library for Nim,
|
||||
# originally available at https://github.com/ehmry/cbor-nim and released under The Unlicense.
|
||||
|
||||
import ../utils/types
|
||||
import ./types
|
||||
import std/sets
|
||||
|
||||
|
||||
proc newUnexpectedKindError*(
|
||||
expectedType: type, expectedKinds: string, cbor: CborNode
|
||||
): ref UnexpectedKindError =
|
||||
|
||||
@ -1,8 +1,21 @@
|
||||
# This file is a modified version of Emery Hemingway’s CBOR library for Nim,
|
||||
# originally available at https://github.com/ehmry/cbor-nim and released under The Unlicense.
|
||||
|
||||
import ./types
|
||||
import ./errors
|
||||
from macros import newDotExpr, newIdentNode, strVal
|
||||
|
||||
|
||||
template tryNext*(c: var CborParser) =
|
||||
let nextRes = c.next()
|
||||
if nextRes.isFailure:
|
||||
return failure(nextRes.error)
|
||||
|
||||
template trySkip*(c: var CborParser) =
|
||||
let skipRes = c.skipNode()
|
||||
if skipRes.isFailure:
|
||||
return failure(skipRes.error)
|
||||
|
||||
template exceptCborKind*(expectedType: type, expectedKinds: set[CborNodeKind],
|
||||
cbor: CborNode) =
|
||||
if cbor.kind notin expectedKinds:
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
# This file is a modified version of Emery Hemingway’s CBOR library for Nim,
|
||||
# originally available at https://github.com/ehmry/cbor-nim and released under The Unlicense.
|
||||
|
||||
import std/[base64, tables]
|
||||
import ../json/stdjson
|
||||
import ./types
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
import std/[streams, options, tables, typetraits, math, endians, times, base64]
|
||||
# This file is a modified version of Emery Hemingway’s CBOR library for Nim,
|
||||
# originally available at https://github.com/ehmry/cbor-nim and released under The Unlicense.
|
||||
|
||||
import std/[streams, options, tables, typetraits, math, endians, times]
|
||||
import pkg/questionable
|
||||
import pkg/questionable/results
|
||||
import ../utils/errors
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
# This file is a modified version of Emery Hemingway’s CBOR library for Nim,
|
||||
# originally available at https://github.com/ehmry/cbor-nim and released under The Unlicense.
|
||||
|
||||
import std/[streams, tables, options, hashes, times]
|
||||
|
||||
const timeFormat* = initTimeFormat "yyyy-MM-dd'T'HH:mm:sszzz"
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
import
|
||||
std/[base64, os, random, times, json, unittest]
|
||||
# This file is a modified version of Emery Hemingway’s CBOR library for Nim,
|
||||
# originally available at https://github.com/ehmry/cbor-nim and released under The Unlicense.
|
||||
|
||||
import std/[base64, os, random, times, json, unittest]
|
||||
import pkg/serde/cbor
|
||||
import pkg/questionable
|
||||
import pkg/questionable/results
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user