Skip to content

Update sqf.js to A3 v2.22 - #4460

Open
LouMontana wants to merge 1 commit into
highlightjs:mainfrom
LouMontana:main
Open

Update sqf.js to A3 v2.22#4460
LouMontana wants to merge 1 commit into
highlightjs:mainfrom
LouMontana:main

Conversation

@LouMontana

Copy link
Copy Markdown

Hi, this updates the SQF language to its current version (A3 v2.22) also adding previously-missed commands from older/other titles.

@joshgoebel

Copy link
Copy Markdown
Member

Do we have code that was used to generate or update these lists? Looks like a LOT of changes... if so we'd like to capture that somewhere so the next maintainer could generate the lists programmatically, etc.

Comment thread src/languages/sqf.js
'forEachReversed',
'from',
'if',
'local',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No more local?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no more 'local' indeed, as it is deemed a command (local) rather than a keyword now (private now)
thanks for checking :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it stay in a separate list perhaps that we track separately? One thing I don't think a lot of people think about is what about all the Arma 2 code still out there being highlighted?

Thoughts?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the 'local' keyword was not used a lot in Arma 2, even in official code; I think it's fine to have it as A3 (I learnt about it when A3 made it obsolete :D). the highlight will still mark it as "keyword"/"command", so I think it's fine.
I suppose it's that or we make an SQF version per game? :-|

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so we keep it then?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say so yes.

@LouMontana

Copy link
Copy Markdown
Author

Do we have code that was used to generate or update these lists? Looks like a LOT of changes... if so we'd like to capture that somewhere so the next maintainer could generate the lists programmatically, etc.

Hi yes, there is SQF code from Leopard20 to generate the list, what I did however was using the Scripting Commands list in order to have all commands from all games (to cover all SQF commands and not just Arma 3 ones).

Comment thread src/languages/sqf.js
Comment on lines -358 to +375
'buldozer_EnableRoadDiag',
'buldozer_IsEnabledRoadDiag',
'buldozer_LoadNewRoads',
'buldozer_enableRoadDiag',
'buldozer_isEnabledRoadDiag',
'buldozer_loadNewRoads',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry just saw this, is there a "idiomatic" case for these even if they are insensitive? Just wondering why they changed.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was from the copy-paste; they are indeed case-insensitive
it is to keep one and same format for command naming, so people don't get auto-suggested SetDamage instead of setDamage, etc

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So these are the preferred idiomatic casing then, yes?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I checked them ;-) Wiki / camelCase is the format to use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants