Conversation
Template literals in rescript are now translated to template literals in JS too.
| | Texp_construct _ | Texp_variant _ | Texp_record _ | Texp_setfield _ | ||
| | Texp_while _ | Texp_pack _ | Texp_function _ | Texp_extension_constructor _ | ||
| -> | ||
| | Texp_template _ -> |
There was a problem hiding this comment.
I'm really not sure about this, should it be static or dynamic?
|
You probably want to add some conversation tests for this. |
|
rescript/analysis/src/CompletionFrontEnd.ml Lines 1143 to 1159 in 48f6ec3 |
rescript
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
@nojaf I think I'll need help on that, btw this file uses a lot of wildcard pattern matching, it'd be cool to list the remaining cases so that the compiler would complain when adding a new case! |
One approach I can think of here is to do a git blame on those lines. One you have that sample, I would run And then run Then updating the pattern matches should ensure things play out as they did.
Something for another PR perhaps. Would not try to solve that here. |
| Ast_helper.Exp.array ~attrs:[] ~loc:Location.none values | ||
| in | ||
| Ast_helper.Exp.apply | ||
| ~attrs:[tagged_template_literal_attr] |
There was a problem hiding this comment.
Do any references to tagged_template_literal_attr still linger? We most likely only need that in the mapper stuff, but for all other code the new AST node is the source of truth.
There was a problem hiding this comment.
I have to check, there's likely still some cleanup left to do!
Add AST for string template literals.
Template literals in rescript are now translated to template literals in JS too.
This should enable better semantic highlighting inside string templates.