-
Notifications
You must be signed in to change notification settings - Fork 476
add AST for template literals #8132
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
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
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.