-
Notifications
You must be signed in to change notification settings - Fork 139
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
Machine readable syntax specification #3707
Conversation
Cadence Benchstat comparisonThis branch with compared with the base branch onflow:master commit 24783e3 Collapsed results for better readability
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did another pass over types as requested. Mainly the precedence rules need to be encoded properly, and the only other thing is the intersection types.
Also did another pass over all declarations, and left a few minor comments, especially regarding what types are allowed.
Will do another pass over expressions tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did another pass reviewing the expression parsing. Looks good, a couple notes.
Note that some expressions need newline differentiation to resolve ambiguities when expressions are used as statements, see the "(* if no line terminator ahead *)" comments in the expression rules of the EBNF grammar, like
Line 457 in 5364220
| postfixExpression (* if no line terminator ahead *) invocation |
For example:
foo(bar) // invocation
foo // identifier expression
(bar) // parenthesized expression
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Only a couple comments to resolve and then we can merge what we have so far.
@SupunS Could you please take a final look?
| viewKeyword | ||
; | ||
|
||
accessKeyword: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't these keywords also tokens? i.e: shouldn't be <accessKeyword>
?
Closes #3686
Description
Added a machine readable syntax specification for the Cadence language and a Syntax Notation document.
master
branchFiles changed
in the Github PR explorer