DragonKnightOfBreeze / Paradox-Language-Support

IDEA Plugin: Paradox Language Support.
https://windea.icu/Paradox-Language-Support
MIT License
41 stars 5 forks source link

Conditional [[param]...] in scripted_triggers/effects/values have highlight issues when incorporated with prefixes/suffices #30

Closed adriangaro closed 1 year ago

adriangaro commented 1 year ago

As title says, using conditional with params inside metascripts with prefixes and suffixes causes highlight issues.

image

DragonKnightOfBreeze commented 1 year ago

Not plan to support yet. Be more kind, and less foxy, plz.

adriangaro commented 1 year ago

Yup, no worry, do not expect them to be fixed this quickly, would love to help if possible myself hah! Just a big code base to look through if I were to make a PR/suggest improvements.

If anything, adding them mostly to be documented for whenever you want/have time to handle, and if you want to! :3

DragonKnightOfBreeze commented 1 year ago

Are u similar with kotlin and Intellij platform?

DragonKnightOfBreeze commented 1 year ago

If u are pleasure, you can try to complete and optimize these CWT configs for Stellaris (it should be very perfect now) and other Paradox Games. try checkout these CWT config repos of mine forked from cwtools'.

adriangaro commented 1 year ago

I am familiar with Kotlin, not so much with writing Intellij plugins x3 But when i will have some try will try the repo locally and see how the innards work and see if I could contribute to some minial amount at least, hah!

DragonKnightOfBreeze commented 1 year ago

Is aaa[[bbb] ccc ]ddd valid? (Notice the white space around ccc) Is "aaa[[bbb] ccc ]ddd" valid? (Notice the double quote around) If there is a script snippet foo = bar[[a]b ]ccc, and assume that ]ccc should be parsed to another string token, how should PLS handle the first bar[[a]b? "']' expected" after b?

adriangaro commented 1 year ago

I think the spaces are not valid as they would add spaces within the thing you want to insert the conditional text.

I think the metascript is basically evaluated at load time and does the substitutions with the parameters, whitespace included

I know that i use some tricks for inline scripts to disable some code by making some parameters # which basically transform the line into a comment for example. So my guess is that whitespace would be inserted if you have whitespace within the square brackets.

Can do a quick test tomorrow and report back.

DragonKnightOfBreeze commented 1 year ago

image

DragonKnightOfBreeze commented 1 year ago

Will be optimized in 1.1.11