ISCode Support 0.2.2
Translate
Open your ISCode file
Press CTRL+SHIFT+P and type :
ISCode : Translate code
And press ENTER
Select the output format and wait
Create or Add my own translation
- Press CTRL+SHIFT+P and type :
ISCode : Open translate folder
- And press ENTER
Import a translation :
- Drag and drop the translation file into the folder
Create my translation :
Make a new file in JSON format : {fileExtention}.json
Example:
"testCode.json" are selected when the current file format is "####.testCode"
Copy paste the next json pattern and define your translation table :
{
"name":"{{FormatExtension}}",
"availableTranslation":{
"{{OutputFormatName}}":"{{OutputFileExtension}}"
},
"tokens":{
"{{ExprName1}}":"{{REGEX1}}",
"{{ExprName2}}":"{{REGEX2}}",
"{{ExprName3}}":"{{REGEX3}}",
},
"instructions":{
"{{InstructionName1}}":{
"syntax":[
"{{ExprName1}}"
],
"snippet":{
"output":"{{Output1}}",
"documentation":"{{InstructionDocumentation1}}",
"commitChars":null
},
"translation":{
"{{OutputFormatName}}":"{{TRANSLATED CODE WITH %{{syntaxIndex}} }}"
}
}
}
}
Exemple :
{
"name":"isc0", //Name of file extension
"availableTranslation":{ //List of all possible translation
"nasm_x86_x64":"nasm" //OutputName : Output file extension
},
"tokens":{ //List of all tokens
"all":".*",
"doubleSlash":"[/]{2}",
"indentation":"[ ]{0,}",
"space":"[ ]{1,}",
"numbers":"[0-9]{1,}",
"communData":"[a-zA-Z0-9_\\[\\]\\-\\+\\*\\,\\$]{1,}",
"InstMode":"mode",
"InstSyscall":"syscall",
},
"instructions":{ //List of all instructions
"architectureMode":{
"syntax":[ //Syntax of the instruction (with tokens name)
"indentation",
"InstMode",
"space",
"numbers"
],
"snippet":{ //Autocomplete
"output":"mode ${1|8,16,32,64|}",
"documentation":"Set architecture mode",
"commitChars":null
},
"translation":{
"nasm_x86_x64":"%{1}bits%{3}%{4}"
},
"syscall":{
"syntax":[
"indentation",
"InstSyscall",
"space",
"communData"
],
"snippet":{
"output":"syscall ${1}",
"documentation":"System call",
"commitChars":null
},
"translation":{
"nasm_x86_x64":"%{1}int%{3}%{4}"
}
}
}
}