anweiss / cddl

Concise data definition language (RFC 8610) implementation and JSON and CBOR validator in Rust
https://cddl.anweiss.tech
MIT License
91 stars 13 forks source link

.regexp control statements raise false error #220

Open sherifhanna-google opened 8 months ago

sherifhanna-google commented 8 months ago

For this example statement from the CBOR RFC 8610 in section 3.8.3:

nai = tstr .regexp "[A-Za-z0-9]+@[A-Za-z0-9]+(\\.[A-Za-z0-9]+)+"

The following error is raised:

image

Expected rule identifier followed by an assignment token `=`, `=/`, or `=//` cddl 
Target text string must match XSD regex value in the control type
anweiss commented 8 months ago

Thanks for reporting this. Looks to be confined to just the Visual Studio Code extension. Otherwise, doesn't seem to be related to the main library.