Skip to content

Conversation

anmonteiro
Copy link
Member

@anmonteiro anmonteiro commented Jan 27, 2024

Part of #863 #995.

Moving both {js| .. |js} and {j| .. |j} from the PPX to the compiler core in #995 ended up causing unused variable warnings when editing the sources.

This change disentangles {j|-based string interpolation (which just knows to concatenate multiple strings separated by interpolated variables) from {js| .. unicode processing and printing. It:

  • in the PPX: processes interpolated variables in {j| .. , expands to multiple AST nodes with {js| strings
  • in the compiler core: Melange knows about {js| .. unicode strings and treats them as such.

@anmonteiro anmonteiro marked this pull request as ready for review January 27, 2024 06:25
@anmonteiro anmonteiro force-pushed the anmonteiro/split-interp-unicode branch from 5d782b8 to 0370004 Compare January 29, 2024 01:56
also error on pattern matching unicode
@anmonteiro anmonteiro merged commit 2622eb7 into main Jan 29, 2024
@anmonteiro anmonteiro deleted the anmonteiro/split-interp-unicode branch January 29, 2024 02:48
anmonteiro added a commit that referenced this pull request Jan 29, 2024
* feat: split string interpolation from unicode processing

* fix: unit tests

* fix: blackbox tests

* refactor: unnest Utf8_string.Utf8_string

* refactor: delete some unused code

* chore: add PR to the relevant changelog entry

* string_itnerp: add interface

* fix: print uninterpreted-delimiters warning if `{j| .. |j}`

also error on pattern matching unicode
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.

1 participant