Skip to content

Conversation

@aspeddro
Copy link
Collaborator

include (
  {
    let a = Js.log("Hello")
  }: {
    let a: unit
  }
)
(source_file [0, 0] - [7, 0]
  (ERROR [0, 0] - [0, 9])
  (ERROR [1, 2] - [3, 4]
    (block [1, 2] - [3, 3]
      (let_declaration [2, 4] - [2, 27]
        (let_binding [2, 8] - [2, 27]
          pattern: (value_identifier [2, 8] - [2, 9])
          body: (call_expression [2, 12] - [2, 27]
            function: (value_identifier_path [2, 12] - [2, 18]
              (module_identifier [2, 12] - [2, 14])
              (value_identifier [2, 15] - [2, 18]))
            arguments: (arguments [2, 18] - [2, 27]
              (string [2, 19] - [2, 26]
                (string_fragment [2, 20] - [2, 25]))))))))
  (expression_statement [3, 5] - [5, 3]
    (block [3, 5] - [5, 3]
      (let_declaration [4, 4] - [4, 15]
        (let_binding [4, 8] - [4, 15]
          pattern: (value_identifier [4, 8] - [4, 9])
          (type_annotation [4, 9] - [4, 15]
            (unit_type [4, 11] - [4, 15]))))))
  (ERROR [6, 0] - [6, 1]))

Playground

@aspeddro aspeddro changed the title include_statement: better support Fix include_statement Apr 16, 2023
@nkrkv
Copy link
Collaborator

nkrkv commented Apr 21, 2023

OMG, what’s possible 😁 Thank you!

@nkrkv nkrkv merged commit 1ba755b into rescript-lang:main Apr 21, 2023
@aspeddro aspeddro deleted the fix-include branch April 21, 2023 18:28
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.

2 participants