Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cbor_serialization.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ license = "Apache License 2.0"
skipDirs = @["tests", "fuzzer"]

requires "nim >= 2.0.0",
"serialization >= 0.4.9", "stew >= 0.4.1", "npeg >= 1.3.0", "results", "unittest2"
"faststreams >= 0.5.1", "serialization >= 0.4.9", "stew >= 0.4.1", "npeg >= 1.3.0",
"results", "unittest2"

#feature "dev":
# requires "bigints", "json_serialization"
Expand Down
6 changes: 5 additions & 1 deletion cbor_serialization/cddl/parser.nim
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

#{.push raises: [], gcsafe.}

{.deprecated: "use parser2".}

import std/strutils
import npeg, results

Expand Down Expand Up @@ -120,7 +122,9 @@ proc newCddlError(s: string, matchLen, matchMax: int): ref CborCddlError =
# https://datatracker.ietf.org/doc/html/rfc8610#appendix-A
# https://datatracker.ietf.org/doc/html/rfc8610#appendix-B
# https://github.com/zevv/npeg#ordering-of-rules-in-a-grammar
proc parseCddl*(source: string): CddlSchema {.raises: [CborCddlError].} =
proc parseCddl*(
source: string
): CddlSchema {.raises: [CborCddlError], deprecated: "use parser2.parseCddl".} =
let parser = peg("cddl", userdata: ParseState):
cddl <- S * +(rule * S) * !1

Expand Down
Loading
Loading