-
Notifications
You must be signed in to change notification settings - Fork 1
Merging JSLigo v2 in stable #83
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
Draft
EduardoRFS
wants to merge
761
commits into
stable
Choose a base branch
from
rinderknecht@new_jsligo
base: stable
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+57,968
−35,558
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…efaulting silently to an array).
… of pattern matchings.
…ns (expressions and patterns) and pattern matching.
…ngs). This is consistent with the way they are declared and used to build values.
…s (raise an exception).
match what was done with the original JsLIGO CST. Basically, I now lift the decorators on declarations to the statement level (if applicable), and create a S_decorated node. Now the unified ASTs match (from dev and our branch).
statement: $ => choice( ..., $.expression_statement, $.declaration, ...), expression_statement: $ => seq($._expressions, $._semicolon), _expressions: $ => choice($.expression, $.sequence_expression), expression: ($, previous) => { ..., $.internal_module, ...), declaration: ($, previous) => choice( ..., prec('declaration', $.internal_module), ...), When recognising an internal module (a.k.a. namespace), the parser will chose and expression over a statement, due to implicit precedence of tree-sitter. The purpose of this commit is to avoid that: wherever a statement is expected, and a namespace occurs, it will be interpreted as a declaration (as a statement), not an expression statement.
…ult of the tests in union_types.ml have to checked.
… the unified AST.
Michelson injection constructs, like "michelson `{ADD}`" or "create_contract_of_file `foo.tz`". Along the way, there was a bug in the compilation to unified AST of template strings, as their literal do not contain the delimiters (backquotes), contrary to normal strings (doublequotes).
…ons to arrow function declarations.
…ernally, the names have not been changed, though. Sorry.
…ons of the pretty-printer (stage 1).
fix(docs): Clarify changes in pattern matching
…to rinderknecht@new_jsligo
* Clarify type annotations, inference, assumptions * Move annotations topic to data-types section
* Remove old language-basics topic on maps * Rework topics on maps and big-maps * No longer using semicolons here * JsLIGO uses commas for big-maps * This annotation is not necessary * typo Co-authored-by: Eduardo Rafael <theeduardorfs@gmail.com> --------- Co-authored-by: Eduardo Rafael <theeduardorfs@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
I will be using this to track the changes needed and to properly review the JSLigo v2.
I'm hoping to be able to retrofit the migration tool and the integration between the current CameLigo in JSLigo v2.