Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add parentheses to CDDL for readability #5

Merged
merged 1 commit into from
Nov 21, 2022
Merged
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
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ This document uses CDDL notation to express CBOR data items:
- `tstr`: CBOR text string
- `bigint`: CBOR bignum
- `? Foo`: Foo is optional
- `(Foo)`: Foo is a group
- `Foo / Bar`: either Foo or Bar
- `Foo + Bar`: Foo followed by Bar
- `[+ Foo]`: one or more Foo in CBOR array
Expand All @@ -322,9 +323,9 @@ Cadence data is encoded depending on its type. For example, Cadence `UInt8` is

```

CCF_Message = ? CCF_CompositeTypeInfo_Message + CCF_TypeAndValue_Message
CCF_Message = (? CCF_CompositeTypeInfo_Message) + CCF_TypeAndValue_Message

CCF_CompositeTypeInfo_Message = #6.CBORTagType([+ CCF_StructTypeInfo_Message / CCF_ResourceTypeInfo_Message / CCF_ContractTypeInfo_Message / CCF_EventTypeInfo_Message / CCF_EnumTypeInfo_Message])
CCF_CompositeTypeInfo_Message = #6.CBORTagType([+ (CCF_StructTypeInfo_Message / CCF_ResourceTypeInfo_Message / CCF_ContractTypeInfo_Message / CCF_EventTypeInfo_Message / CCF_EnumTypeInfo_Message)])

composite_type_record = [
id: bstr,
Expand Down