Skip to content

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
wants to merge 761 commits into
base: stable
Choose a base branch
from
Draft

Conversation

EduardoRFS
Copy link
Contributor

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.

…ns (expressions and patterns) and pattern matching.
…ngs). This is consistent with the way they are declared and used to build values.
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.
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).
rinderknecht and others added 25 commits June 23, 2025 08:50
…ernally, the names have not been changed, though. Sorry.
fix(docs): Clarify changes in pattern matching
* Clarify type annotations, inference, assumptions

* Move annotations topic to data-types section
@EduardoRFS EduardoRFS marked this pull request as draft July 9, 2025 23:01
timothymcmackin and others added 4 commits July 10, 2025 23:42
* 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants