christoffer / pycharm-pyxl

IntelliJ Pyxl Extensions
MIT License
21 stars 3 forks source link

Comments in multiline comments regression #5

Closed christoffer closed 9 years ago

christoffer commented 10 years ago

Putting a comment at the end of a multiline attribute list in Pyxl causes the lexer to bork (BAD_CHAR).

I know I fixed this at some point, and there must have been a recent regression. Could you have a quick look at it @nilsbunger ?

<link_button
    importance="secondary" # still broken
    variant="big"
    href="/business/try"
>
    {self.content['button-text']}
</link_button>
nilsbunger commented 10 years ago

There was a lexer issue here (emitting BAD_CHAR) which I've fixed. Now it looks like there's a parser issue on this so I'm re-assigning to Robert.

kajic commented 10 years ago

Will take a look tomorrow evening! :)

kajic commented 10 years ago

The problem occurs only when the pyxl tag expression isn't parenthesized. Right after link_button I'm seeing a Py:STATEMENT_BREAK. I'm expecting a pyxl ATTRNAME token. I think it would be best if the lexer skipped all whitespace around attributes and just produced the tokens that we actually care about. The alternative is to add a load of whitespace skipping code to the parser. That seems like the wrong place to do it. Or might the problem be that the lexer is in the wrong state (python instead of pyxl) right after the tag name?

lihaoyi commented 10 years ago

This totally happens when the pyxl tag is parenthesized

screenshot 2014-08-12 11 57 22

Unless it was fixed in a more recent version than I have? Which seems possible...

christoffer commented 9 years ago

Closing this as invalid, since it works for me in the version I'm currently running (might have been fixed in between now and the latest relase to jetbrains)

https://www.dropbox.com/s/wl19i76ro3lp1sc/Screenshot%202014-12-27%2019.57.54.png?dl=0