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

Merge main into fork #1

Merged
merged 46 commits into from
Mar 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
77f184f
Merge pull request #24 from ConnorAU/master
Armitxes Oct 28, 2018
3729cf1
[FIX] package.json: Adjust autoClosingBrackets parameter value
Armitxes Oct 28, 2018
e09461e
Milestone 3 - Preparation push
Armitxes Nov 14, 2018
7123d9b
[IMP] Further progress in new structure
Armitxes Nov 23, 2018
2a9b472
Node modules (no more issues because someone is missing smth)
Armitxes Nov 23, 2018
8df04e2
[IMP] Further progress on more performant workflow
Armitxes Nov 26, 2018
77a726f
[FIX] Old validator with new structure
Armitxes Nov 26, 2018
aa32b74
[IMP] Progress on file parsing
Armitxes Nov 27, 2018
d8d157b
Update package.json
Dec 4, 2018
5130b80
Add files via upload
Dec 4, 2018
2b7f4a2
Add files via upload
Dec 4, 2018
c954ec8
[IMP] Recognize multiple occurences of 1 command per line
Armitxes Dec 15, 2018
45d0261
[ADD] BI Wiki Crawler (WIP)
Armitxes Dec 17, 2018
c9e6184
[IMP] Solve instance issue
Armitxes Dec 21, 2018
5475d00
[IMP] Progress on wikiCrawler
Armitxes Dec 22, 2018
6784605
[IMP] wikiCrawler updated
Armitxes Dec 24, 2018
7cb8a75
[IMP] Improved wiki crawler and first result
Armitxes Dec 25, 2018
2c8fe04
[MOVE] biWiki.json -> sqfCommands.json
Armitxes Dec 25, 2018
7310ef4
[FIX] Project configuration
Armitxes Dec 26, 2018
9afe9b8
[IMP] Variable Types: Object Subtypes
Armitxes Dec 27, 2018
ddcaca1
[IMP] Progress
Armitxes Dec 30, 2018
06dead2
[IMP] Progress
Armitxes Jan 1, 2019
b5c3fdf
[ADD] Working Server <-> Client Sync
Armitxes Jan 6, 2019
39032a0
[IMP] New object types, Wiki corrector (progress for interpretable sy…
Armitxes Jan 13, 2019
e81f7db
[IMP] Progress on wiki interpretation
Armitxes Jan 20, 2019
1825ca3
Advancement
Armitxes Feb 8, 2019
6500d30
[IMP] Prep subscopes and string interpreter
Armitxes Feb 9, 2019
57ea4b8
[IMP] Improvements on sqf interpretation
Armitxes Feb 10, 2019
519afb6
[IMP] A better understandable HR-License
Armitxes Feb 10, 2019
b71e2d0
[IMP] String interpretation
Armitxes Feb 15, 2019
5b5c991
[FIX] Broken sqf.min.json due too early restart & desync
Armitxes Mar 8, 2019
6aa38c6
[REF] Revert to non-scope functionality for a pre-release. Despite ma…
Armitxes Mar 9, 2019
3674f4c
[REM] Remove char loop from pare file (scope does this)
Armitxes Mar 10, 2019
a016dbc
[REM] Unused file
Armitxes Mar 10, 2019
4624125
Release v2.0.0
Armitxes Mar 10, 2019
4b0aa35
Merge pull request #30 from Armitxes/development
Armitxes Mar 10, 2019
50b990b
[FIX] event-stream security vunerability
Armitxes Mar 10, 2019
6504130
Merge pull request #31 from Armitxes/fix/security-hotfix
Armitxes Mar 10, 2019
61075d3
Merge pull request #32 from Armitxes/development
Armitxes Mar 10, 2019
23e30ce
Merge branch 'feature/27/ext-highlighting' into master
Armitxes Mar 10, 2019
bfc1a29
Merge pull request #27 from thecogdoctor/master
Armitxes Mar 10, 2019
3dfbfa4
[IMP] Rename .ext files
Armitxes Mar 10, 2019
cfb8fab
[IMP] Minify ext syntax file
Armitxes Mar 10, 2019
0e73974
[IMP] Activate .ext support in package.json
Armitxes Mar 10, 2019
9cd11e2
Merge pull request #33 from Armitxes/feature/27/ext-highlighting
Armitxes Mar 10, 2019
efd8c14
Merge pull request #34 from Armitxes/development
Armitxes Mar 10, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
*.map
*.vscode
*.sqf
devHelper/output/
52 changes: 47 additions & 5 deletions LICENSE.htm
Original file line number Diff line number Diff line change
@@ -1,6 +1,48 @@
<span style="display:none">
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/4.0/.
</span>
<style>
body {
font-size: 20px;
padding: 10px;
max-width: 1600px;
}

<a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a><br /><span xmlns:dct="https://purl.org/dc/terms/" property="dct:title">VS Code - SQF Language</span> by <a xmlns:cc="https://creativecommons.org/ns#" href="https://github.com/Armitxes/VSCode_SQF" property="cc:attributionName" rel="cc:attributionURL">Armitxes ( Jan Brodersen )</a> is licensed under a <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.
div.hr_license_header {
text-align: center;
}
</style>

<div class="hr_license_header">
<a rel="hr_license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a>
<br /><span xmlns:dct="https://purl.org/dc/terms/" property="dct:title">VS Code - SQF Language</span> by <a xmlns:cc="https://creativecommons.org/ns#" href="https://github.com/Armitxes/VSCode_SQF" property="cc:attributionName" rel="cc:attributionURL">Armitxes ( Jan Brodersen )</a> is licensed under a <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.
<br />
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/4.0/.
</div>

<hr />
<div class="hr_license_body">
This is a human-readable summary of (and not a substitute for) the <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode">license</a>.
<br />
<br />
<b>Under the following terms:</b>
<ul>
<li><b>Attribution</b> — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.</li>
<li><b>NonCommercial</b> — You may not use the material for commercial purposes.</li>
<li><b>ShareAlike</b> — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.</li>
<li><b>No additional restrictions</b> — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.</li>
</ul>
<br />
<br />
<b>You are free to:</b>
<ul>
<li><b>Share</b> — copy and redistribute the material in any medium or format</li>
<li><b>Adapt</b> — copy and redistribute the material in any medium or format</li>
</ul>
<br />
The licensor cannot revoke these freedoms <u>as long as you follow the license terms</u>.
<br />
No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material.
<hr />
The author reserves the right to grant additional permissions for his work, if limited or not covered by this license.
<br />Additional permissions are limited to an issued legal entity and only valid in written form.

</div>
18 changes: 18 additions & 0 deletions configs/ext.configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"comments": {
"lineComment": "//",
"blockComment": ["/*", "*/"]
},
"brackets": [
["{", "}"]
],
"autoClosingPairs": [
["[", "]"],
["\"", "\""],
["(", ")"]
],
"surroundingPairs": [
["'", "'"],
["\"", "\""]
]
}
111 changes: 111 additions & 0 deletions devHelper/wikiCorrector.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# -*- coding: utf-8 -*-
# Written by Armitxes (Jan Brodersen)
# All rights reserved. For more information visit https://armitxes.net

import os
import json
import re

biWiki = json.load(open('./env/shared/commands/sqfCommands.min.json'))

# Review Levels:
# 1 -> Corrected by wikiCorrector, has issues
# 2 -> Corrected by wikiCorrector, has no issues
# 3 -> Corrected by a dev / contributor, has issues
# 4 -> Corrected by a dev / contributor, has no issues

# Statistics
cmdStats = {
'total': 0,
'levels': {1:0, 2:0, 3:0, 4:0},
'versions': {

}
}

def update_stats(version, level):
if version not in cmdStats['versions']:
cmdStats['versions'][version] = {
'total': 0,
'levels': {1:0, 2:0, 3:0, 4:0},
}

cmdStats['total'] += 1
cmdStats['levels'][level] += 1
cmdStats['versions'][version]['total'] +=1
cmdStats['versions'][version]['levels'][level] +=1

def print_stats():
print(
'\n---------------------------------\n',
'Total Commands:', cmdStats['total'],
'\n - Level 1:', cmdStats['levels'][1],
'\n - Level 2:', cmdStats['levels'][2],
'\n - Level 3:', cmdStats['levels'][3],
'\n - Level 4:', cmdStats['levels'][4],
'\n---------------------------------\n'
)

for version in sorted(cmdStats['versions']):
print(
'\nTotal', version, 'Commands:', cmdStats['versions'][version]['total'],
'\n - L1:', cmdStats['versions'][version]['levels'][1],
'| L2:', cmdStats['versions'][version]['levels'][2],
'| L3:', cmdStats['versions'][version]['levels'][3],
'| L4:', cmdStats['versions'][version]['levels'][4],
)

for version in biWiki:
ver = biWiki[version]

for command in biWiki[version]:
cmd = ver[command]
reviewLevel = cmd.get('reviewLevel', 0)

if reviewLevel > 2:
update_stats(version, reviewLevel)
continue

docSyntax = cmd.get('docSyntax')
if docSyntax:
docSyntax = docSyntax.replace(', ', ',')
docSyntax = re.sub(r'(?i)\b(\\\"[A-Za-z0-9_ \t]*\\\"|boardName|weapon|taskName|magazine|name|string|text|subject|skillName|texture|markerName|soundName)\b', '<string>', docSyntax)
docSyntax = re.sub(r'(?i)\b(object|obj|target)\b', '<object>', docSyntax)
docSyntax = re.sub(r'(?i)\b(unit|player|person|unitName|killer|killed|member|anObject)\b', '<objUnit>', docSyntax)
docSyntax = re.sub(r'(?i)\b(vehicle|car|cargo)\b', '<objVehicle>', docSyntax)
docSyntax = re.sub(r'(?i)\b(grp|group)\b', '<objGroup>', docSyntax)
docSyntax = re.sub(r'(?i)\b(item)\b', '<objItem>', docSyntax)
docSyntax = re.sub(r'(?i)\b(map)\b', '<objMap>', docSyntax)
docSyntax = re.sub(r'(?i)\b(side)\b', '<objSide>', docSyntax)
docSyntax = re.sub(r'(?i)\b(task)\b', '<objTask>', docSyntax)
docSyntax = re.sub(r'(?i)\b(trigger)\b', '<objTrigger>', docSyntax)
docSyntax = re.sub(r'(?i)\b(curatorObj)\b', '<objCurator>', docSyntax)
docSyntax = re.sub(r'(?i)\b(camera)\b', '<objCamera>', docSyntax)
docSyntax = re.sub(r'(?i)\b(code)\b', '<code>', docSyntax)
docSyntax = re.sub(r'(?i)\b(bool|boolean|true|false|enabled|enable|locked)\b', '<bool>', docSyntax)
docSyntax = re.sub(r'(?i)\b(idc|index|objectId|delay|distance|damage|ownerID|points|value|n|id|order|coef|row|column|scale|speed|altitude|color|number|time|zoom)\b', '<scalar>', docSyntax)
docSyntax = re.sub(r'(?i)\b(control|ctrl)\b', '<uiControl>', docSyntax)
docSyntax = re.sub(r'(?i)\b(display)\b', '<uiDisplay>', docSyntax)
docSyntax = re.sub(r'(?i)\b(configClass)\b', '<cfgClass>', docSyntax)
docSyntax = re.sub(r'(?i)\b(params)\b', '<any>', docSyntax)
docSyntax = re.sub(r'(?i)\b(flag)\b', '<objFlag>', docSyntax)
docSyntax = re.sub(r'(?i)\b(leaderPos|array|pos|rotation)\b', '<array>', docSyntax)

reviewLevel = 2
for docSyn in docSyntax.split(' '):
if docSyn != command and \
not docSyn.isnumeric() and \
docSyn not in ['=', '>', '<', ' ', '-', '+', '*', '^', '/', 'call', 'spawn'] and \
'_' not in docSyn and docSyn.isalpha():
reviewLevel = 1
break

update_stats(version, reviewLevel)
cmd['reviewLevel'] = reviewLevel
cmd['syntax'] = docSyntax

path = os.path.dirname(os.path.realpath(__file__)) + '/output/sqfCommandsCorrected.json'
with open(path, 'w') as jsonFile:
json.dump(biWiki, jsonFile)

print_stats()
Loading