Skip to content
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

Line breaks not handled gracefully #131

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

Line breaks not handled gracefully #131

wants to merge 8 commits into from

Conversation

Konafets
Copy link
Owner

This happened because the lexer got confused by the unknown Tag imagekit which comes from an addon. It was lexed and parsed as a variable and the syntax does not allow dynamic bindings for variables, only for Tags. This PR introduces an T_UNKOWN_TAG token, which is returned by the lexer when he sees an Identifier which is followed by one or more whitespaces and a colon.

The formatting issues was just a side effect of the wrong parsing.

Closes #120

@Konafets Konafets added this to the 0.0.6 milestone Mar 14, 2023
@Konafets Konafets self-assigned this Mar 14, 2023
@Konafets Konafets force-pushed the fix_issue_120 branch 3 times, most recently from 341890b to 799449e Compare March 17, 2023 00:56
@Konafets Konafets marked this pull request as draft March 17, 2023 00:57
This happened because the lexer got confused by the unknown Tag `imagekit` which comes from an addon. It was lexed and parsed as a variable and the syntax does not allow dynamic bindings for variables, only for Tags. This PR introduces an `T_UNKOWN_TAG` token, which is returned by the lexer when he sees an Identifier which is followed by one or more whitespaces and a colon.

The formatting issues was just a side effect of the wrong parsing.

Closes #120
Remove unused makros from `.flex` file and add a test which we ignore right now.
Add the `imagekit` Tag to the lexer.
- The construct which was used is a bit complicated and it turns out this was not needed. Additionally a method was used which was marked as "experimental" and got marked in the Verifier and on the Marketplace. Jetbrains recently pointed out that those APIs should be not used in the future, otherwise the plugin will get refused in the review.

- Beside this, I migrated some more files to Kotlin and added an experimental new Formatter implementation. 

- With the changes in `AntlersFileViewProvider` we do not need `AntlersAstFactory` anymore and can retire it. For now its just disabled.
Use the settings to format the space.
- Add some style options for switch node
- Fix spacing for parameter assignment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Line breaks not handled gracefully
1 participant