[ABNF] Add char type.

This is a new scalar type for characters.
This commit is contained in:
Alessandro Coglio 2021-05-12 18:22:08 -07:00
parent b3ec8ca8b9
commit 19d3bf0125

View File

@ -390,6 +390,7 @@ end-of-line-comment = "//" *not-line-feed-or-carriage-return newline
keyword = %s"address"
/ %s"as"
/ %s"bool"
/ %s"char"
/ %s"circuit"
/ %s"console"
/ %s"const"
@ -590,14 +591,16 @@ group-type = %s"group"
arithmetic-type = integer-type / field-type / group-type
; The arithmetic types, along with the boolean and address types,
; The arithmetic types, along with the boolean, address, and character types,
; form the scalar types, i.e. the ones whose values do not contain (sub-)values.
boolean-type = %s"bool"
address-type = %s"address"
scalar-type = boolean-type / arithmetic-type / address-type
character-type = %s"char"
scalar-type = boolean-type / arithmetic-type / address-type / character-type
; Circuit types are denoted by identifiers and the keyword `Self`.
; The latter is only allowed inside a circuit definition,