Skip to content

Commit

Permalink
Add inclusiverange and inclusiverange-type in CDDL
Browse files Browse the repository at this point in the history
This update corresponds to Cadence PR 2523 and subsequent changes to inclusiverange and inclusiverange-type:
onflow/cadence#2523

This change does not affect CCF Codec because it 
was already implemented and deployed in CCF codec.
  • Loading branch information
fxamacker authored Oct 23, 2024
1 parent f93d24f commit d72b68c
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions ccf_specs.md
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,8 @@ cbor-tag-dict-type = 141
cbor-tag-reference-type = 142
cbor-tag-intersection-type = 143
cbor-tag-capability-type = 144
; 145-159 are reserved
cbor-tag-inclusiverange-type = 145
; 146-159 are reserved
; composite types
cbor-tag-struct-type = 160
Expand Down Expand Up @@ -704,7 +705,8 @@ cbor-tag-reference-type-value = 190
cbor-tag-intersection-type-value = 191
cbor-tag-capability-type-value = 192
cbor-tag-function-type-value = 193
; 194-207 are reserved
cbor-tag-inclusiverange-type-value = 194
; 195-207 are reserved
; composite type values
cbor-tag-struct-type-value = 208
Expand Down Expand Up @@ -818,6 +820,7 @@ inline-type =
/ reference-type
/ intersection-type
/ capability-type
/ inclusiverange-type
/ type-ref
simple-type =
Expand Down Expand Up @@ -867,6 +870,10 @@ capability-type =
inline-type / nil
])
inclusiverange-type =
; cbor-tag-inclusiverange-type
#6.145(inline-type)
type-ref =
; cbor-tag-type-ref
#6.136(id)
Expand Down Expand Up @@ -956,6 +963,7 @@ value =
/ composite-value
/ path-value
/ capability-value
/ inclusiverange-value
/ function-value
/ type-value
Expand Down Expand Up @@ -987,6 +995,12 @@ id-capability-value = [
id: uint64-value
]
inclusiverange-value = [
start: value,
end: value,
step: value,
]
simple-value =
void-value
/ bool-value
Expand Down Expand Up @@ -1080,6 +1094,7 @@ type-value = simple-type-value
/ reference-type-value
/ intersection-type-value
/ capability-type-value
/ inclusiverange-type-value
/ type-value-ref
simple-type-value =
Expand Down Expand Up @@ -1191,6 +1206,10 @@ capability-type-value =
type-value / nil
])
inclusiverange-type-value =
; cbor-tag-inclusiverange-type-value
#6.194(type-value)
type-value-ref =
; cbor-tag-type-value-ref
#6.184(id)
Expand Down

0 comments on commit d72b68c

Please sign in to comment.