amber icon indicating copy to clipboard operation
amber copied to clipboard

Tweaking templated Strings model.

Open lahodaj opened this issue 3 years ago • 2 comments

I was peeking at the templated Strings, and there are a few tweaks to the model that might be considered:

  • TreeScanner should visit all the children under TemplatedStringTree.
  • the start and end positions of a TemplatedStringTree are wrong - the start position starts at the position of the String literal (not including the policy), and end position is at the end of the last nested expression, not at the end of the String literal.
  • TemplatedStringTree has getString() that returns an expression of the (templatized) String literal. While this has certain usefulness (e.g. to detect spans), it is different from how e.g. MemberSelectTree work. My proposal is to replace the expression with a simple String, which is more similar to MemberSelectTree, although I admit this might be somewhat controversial.

Progress

  • [x] Change must not contain extraneous whitespace
  • [ ] Commit message must refer to an issue
  • [ ] Change must be properly reviewed

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/amber pull/77/head:pull/77
$ git checkout pull/77

Update a local copy of the PR:
$ git checkout pull/77
$ git pull https://git.openjdk.java.net/amber pull/77/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 77

View PR using the GUI difftool:
$ git pr show -t 77

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/amber/pull/77.diff

lahodaj avatar Dec 13 '21 09:12 lahodaj

:wave: Welcome back jlahoda! A progress list of the required criteria for merging this PR into templated-strings will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

bridgekeeper[bot] avatar Dec 13 '21 09:12 bridgekeeper[bot]

Thx

JimLaskey avatar Dec 13 '21 13:12 JimLaskey

@lahodaj This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Dec 06 '22 04:12 bridgekeeper[bot]

@lahodaj This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.

bridgekeeper[bot] avatar Jan 03 '23 09:01 bridgekeeper[bot]