amazon-ion / ion-schema-rust

Rust implementation of Ion Schema
https://amazon-ion.github.io/ion-schema/sandbox
Apache License 2.0
13 stars 6 forks source link

adds changes for `annotations` constraint implementation #81

Closed desaikd closed 2 years ago

desaikd commented 2 years ago

Issue #9 #10

Description of changes: This PR works on adding implementation of annotations constraint.

Grammar:

<ANNOTATION> ::= <SYMBOL>
               | required::<SYMBOL>
               | optional::<SYMBOL>

<ANNOTATIONS_MODIFIER> ::= required::
                         | ordered::
                         | closed::

<ANNOTATIONS> ::= annotations: <ANNOTATIONS_MODIFIER>... [ <ANNOTATION>... ]

Ion Schema specification: https://amzn.github.io/ion-schema/docs/spec.html#annotations

List of changes:

Tests: added unit tests for annotations implementation.