glimmerjs / glimmer-vm

MIT License
1.13k stars 190 forks source link

[@glimmer/syntax] - parser, incorrect location data for nested blocks #1091

Open lifeart opened 4 years ago

lifeart commented 4 years ago

example:

https://astexplorer.net/#/gist/64efcbf444c269a6b34bc235e1d2133f/81d23af14af539e4eb64b0977589f7141fab236a unable to select nodes inside 2nd {{else}}

the inverse: Block has the wrong loc

image

loc.lines: 2 - 3, instead of 2 - 12

{{#if this.a}}
{{else if this.b}}
{{else}}
  [ unselectable ]
    {{this.try.select.me}}
  <AudioPlayer
    @audioFileUrl={{@task.audioFileUrl}}
    @disabled={{@disableAudioPlayer}}
  />

  [ unselectable ]
{{/if}}
rwjblue commented 4 years ago

Thanks for reporting! Would love a failing test case for this...

lifeart commented 4 years ago

@rwjblue https://github.com/glimmerjs/glimmer-vm/pull/1092