linux-china / jetbrains-just-plugin

JetBrains Just Command Runner Plugin
https://plugins.jetbrains.com/plugin/18658-just
Apache License 2.0
40 stars 6 forks source link

Missing syntax support #3

Closed sja closed 2 years ago

sja commented 2 years ago

Example:

export VAR_A := "a b c"
export VAR_AB := VAR_A + " d e f"

The parser gives an error here between VAR_A and +:

JustToken.COMMENT, JustToken.KEYWORD_ALIAS, JustToken.KEYWORD_EXPORT, JustToken.KEYWORD_SET, JustToken.NEW_LINE, JustToken.RECIPE_NAME, JustToken.SHEBANG or JustToken.VARIABLE expected

I'm using 0.2.1 with GoLand 2022.1.

nem75 commented 2 years ago

In the same vein: … := if … throws off the parser, as well as one-liner if-else constructs. See here:

image

For reproduction:

export TEST1 := if os() == 'x' { 'y' } else { 'z' }
export TEST2 := if os() == 'x' { `echo a` } else { `echo b` }

Sorry to say, but in the plugin's current state we're better off with the GNU Makefile file type.

phillipross commented 2 years ago

I bumped into this issue too w/ IDEA 2022.1.1

At first I thought it was an issue with just until I realized the file works but its the plugin that marks it as invalid 😅

linux-china commented 2 years ago

Yes, it's a bug, and fixed already. I have uploaded a new version to JetBrains plugin marketplace, and it will be available in 1-2 days.

image