Skip to content

Commit

Permalink
Merge pull request #3760 from onflow/sprowes/syntax
Browse files Browse the repository at this point in the history
address latest comments on PR
  • Loading branch information
jsproz authored Feb 21, 2025
2 parents 931f404 + 9c662b6 commit 85ba02e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions docs/syntax/Cadence.syntax
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ nonquotedTextItemCharacter:

escapedCharacter:
escapedUnicodeScalar
| escapedCCharacter
| escapedCharacter
;

escapedUnicodeScalar:
Expand All @@ -121,7 +121,7 @@ escapedUnicodeScalar:
unicodeScalarDigit:
"0123456789abcdefABCDEF" ;

escapedCCharacter:
escapedCharacter:
"\\" "0\\tnr\"'" ;

%parser
Expand All @@ -139,8 +139,8 @@ access:
| accessMapping // ast.Access
| accessSelf // ast.Access
| accessEntitlement // ast.Access
| accessPub // { error( "'pub' access modifier not supported" ) }
| accessPriv
| accessPub // error: `pub` and `pub(set)` are no longer valid access keywords
| accessPriv // error: `priv` is no longer a valid access keyword
| accessNotSpecified // ast.AccessNotSpecified
;

Expand Down Expand Up @@ -173,11 +173,13 @@ accessPub:
;

accessPubSet:
// error: `pub(set)` is no longer a valid access keyword
"(" setKeyword ")"
;

accessPriv:
privKeyword // error: `priv` is no longer a valid access keyword
// error: `priv` is no longer a valid access keyword
privKeyword
;

argument:
Expand Down Expand Up @@ -525,6 +527,7 @@ fullType:
| fullTypeNested // ast.FullType
;

// TODO split this rule up and to encode the precedence rules
fullTypeNormal:
*1fullTypeReference innerType *fullTypeOptional
;
Expand Down

0 comments on commit 85ba02e

Please sign in to comment.