1
0
mirror of https://github.com/ksherlock/x65.git synced 2024-12-28 04:31:46 +00:00

Changing theme from XML to JSON, adding Windows installer

* I don't like XML one bit
* Writing a bat file is easier than putting something on the marketplace
without using javascript.
This commit is contained in:
Carl-Henrik Skårstedt 2017-04-15 13:34:16 -07:00
parent e0dea61dc4
commit c1eb222c30
8 changed files with 256 additions and 480 deletions

View File

@ -1,3 +1,7 @@
## 0.1.1
* Converted XML to JSON as XML is the official file format of unreadability
* Added windows install batch file
## 0.1.0
* Bunched together a shabby working version of Visual Studio Code editing of 6502 intended for assembling with x65
* Added coloring for section control

View File

@ -8,9 +8,15 @@ As I don't like the marketplaceification of seemingly simple tools I'm not putti
In order to "side load" this extension into visual studio code follow these steps
Windows:
1. Make sure Visual Studio Code is installed
2. Run vscode\install.bat
Mac / Linux:
1. Install Visual Studio Code unless already Installed
2. Go to the visual studio code extension folder
* Windows %USERPROFILE%\.vscode\extensions
* Mac ~/.vscode/extensions
* Linux ~/.vscode/extensions
3. Create a folder named x65

4
vscode/install.bat Normal file
View File

@ -0,0 +1,4 @@
@echo off
if not exist "%USERPROFILE%\.vscode\extensions\x65" mkdir %USERPROFILE%\.vscode\extensions\x65
xcopy %~dp0*.* %USERPROFILE%\.vscode\extensions\x65 /EXCLUDE:%~dp0\install.bat /Q /Y

View File

@ -2,7 +2,7 @@
"name" : "x65",
"displayName" : "x65",
"description" : "x65 Assembler syntax",
"version" : "0.1.0",
"version" : "0.1.1",
"publisher" : "x65",
"icon": "x65.png",
"license" : "maybe",
@ -12,14 +12,12 @@
"categories" : [
"Languages"
],
"keywords" : [
"x65", "6502", "6510", "65816"
],
"keywords" : ["x65", "6502", "6510", "65816" ],
"contributes" : {
"languages" : [
{
"id" : "x65",
"aliases" : ["6502"],
"aliases" : [ "6502" ],
"extensions" : [ ".s", ".i" ],
"configuration" : "./x65.configuration.json"
}
@ -28,14 +26,14 @@
{
"language" : "x65",
"scopeName" : "source.asm.6502.x65",
"path" : "./x65.tmLanguage"
"path" : "./x65.tmLanguage.json"
}
],
"themes" : [
{
"label": "x65",
"uiTheme": "vs-dark",
"path": "./x65.tmTheme"
"path": "./x65.tmTheme.json"
}
]
}

View File

@ -1,235 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>s</string>
<string>i</string>
</array>
<key>name</key>
<string>x65</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#comments</string>
</dict>
<dict>
<key>include</key>
<string>#constants</string>
</dict>
<dict>
<key>include</key>
<string>#control</string>
</dict>
<dict>
<key>include</key>
<string>#opcodes</string>
</dict>
<dict>
<key>include</key>
<string>#quotes</string>
</dict>
<dict>
<key>include</key>
<string>#storage</string>
</dict>
<dict>
<key>include</key>
<string>#operators</string>
</dict>
<dict>
<key>include</key>
<string>#labels</string>
</dict>
</array>
<key>repository</key>
<dict>
<key>control</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>(?i)((^|\s+)(CPU|PROCESSOR|PC|ORG|LOAD|EXPORT|SECTION|SEG|SEGMENT|MERGE|LINK|INCOBJ|ALIGN|MACRO|MAC|EVAL|PRINT|ECHO|BYTE|BYTES|WORD|WORDS|LONG|DC|DV|TEXT|INCLUDE|INCBIN|IMPORT|CONST|LABEL|STRING|UNDEF|INCSYM|LABPOOL|POOL|IF|IFDEF|ELSE|ELIF|ENDIF|STRUCT|ENUM|REPT|REPEAT|INCDIR|A16|A8|XY16|XY8|I16|I8|DUMMY|DUMMY_END|DS|ABORT|ERR)|\s+ert)\b</string>
<key>name</key>
<string>directive</string>
</dict>
<dict>
<key>match</key>
<string>(?i)((^|\s+)(XDEF|XREF|SECTION|SEG|SEGMENT|MERGE|LINK|INCOBJ)|\s+ert)\b</string>
<key>name</key>
<string>control.segment</string>
</dict>
</array>
</dict>
<key>opcodes</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\b(adc|and|asl|bit|clc|cld|cli|clv|cmp|cpx|cpy|dec|dex|dey|eor|inc|inx|iny|lda|ldx|ldy|lsr|nop|ora|pha|php|pla|plp|rol|ror|sbc|sec|sed|sei|sta|stx|sty|tax|txa|tay|tya|tsx|txs|ADC|AND|ASL|BIT|CLC|CLD|CLI|CLV|CMP|CPX|CPY|DEC|DEX|DEY|EOR|INC|INX|INY|LDA|LDX|LDY|LSR|NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|SBC|SEC|SED|SEI|STA|STX|STY|TAX|TXA|TAY|TYA|TSX|TXS)\b</string>
<key>name</key>
<string>keyword.other.opcode</string>
</dict>
<dict>
<key>match</key>
<string>\b(bcc|bcs|beq|bmi|bne|bpl|brk|bvc|bvs|jmp|jsr|rti|rts|BCC|BCS|BEQ|BMI|BNE|BPL|BRK|BVC|BVS|JMP|JSR|RTI|RTS)\b</string>
<key>name</key>
<string>keyword.pc</string>
</dict>
<dict>
<key>match</key>
<string>\b(aso|rln|lse|rrd|sax|lax|dcp|isb|anc|alr|arr|ane|anx|sbx|las|sha|shs|shx|shy|npo|cim|dop|top)\b</string>
<key>name</key>
<string>keyword.other.opcode.6502.illegal</string>
</dict>
</array>
</dict>
<key>comments</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>/\*</string>
<key>end</key>
<string>\*/</string>
<key>name</key>
<string>comment.block</string>
</dict>
<dict>
<key>match</key>
<string>//.*</string>
<key>name</key>
<string>comment.line.double-slash</string>
</dict>
<dict>
<key>match</key>
<string>;.*</string>
<key>name</key>
<string>comment.line.semicolon</string>
</dict>
<dict>
<key>match</key>
<string>^\S*\s*(\*.*)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>comment.line.asterisk</string>
</dict>
</dict>
</dict>
</array>
</dict>
<key>quotes</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>'</string>
<key>end</key>
<string>'</string>
<key>name</key>
<string>string.quoted.single</string>
</dict>
<dict>
<key>begin</key>
<string>"</string>
<key>end</key>
<string>"</string>
<key>name</key>
<string>string.quoted.double</string>
</dict>
</array>
</dict>
<key>constants</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>(?i)(?<=,)\s*[xy]\b(?!.*\.reg)</string>
<key>name</key>
<string>constant.language.registers</string>
</dict>
<dict>
<key>match</key>
<string>\b[0-9]+\b</string>
<key>name</key>
<string>constant.numeric.decimal</string>
</dict>
<dict>
<key>match</key>
<string>(?i)\$\b\h+\b|\b0x\h+\b</string>
<key>name</key>
<string>constant.numeric.hexadecimal</string>
</dict>
<dict>
<key>match</key>
<string>%\b[0-1]+\b</string>
<key>name</key>
<string>constant.numeric.binary</string>
</dict>
</array>
</dict>
<key>storage</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>(?i)(^|\s+)align\b</string>
<key>name</key>
<string>storage.modifier</string>
</dict>
</array>
</dict>
<key>labels</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>(?i)(^|\s+)[\!\.][a-zA-Z0-9_]+\b</string>
<key>name</key>
<string>label.local</string>
</dict>
<dict>
<key>match</key>
<string>(?i)(^|\s+)[!\!\.][a-zA-Z0-9_]+\b</string>
<key>name</key>
<string>label.global</string>
</dict>
<dict>
<key>match</key>
<string>(?i)[\!\%]\b</string>
<key>name</key>
<string>label.scope</string>
</dict>
</array>
</dict>
<key>operators</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>(?i)[+\-*/%!|^=~\:&amp;&lt;&gt;]</string>
<key>name</key>
<string>constant.language</string>
</dict>
</array>
</dict>
</dict>
<key>scopeName</key>
<string>source.asm.6502.x65</string>
<key>uuid</key>
<string>3a93182b-9647-4133-bead-cd118e3ed088</string>
</dict>
</plist>

View File

@ -0,0 +1,98 @@
{
"name": "x65",
"fileTypes": [ "s", "i" ],
"patterns": [
{
"match": "(?i)((^|\\s+)(CPU|PROCESSOR|PC|ORG|LOAD|EXPORT|SECTION|SEG|SEGMENT|MERGE|LINK|INCOBJ|ALIGN|MACRO|MAC|EVAL|PRINT|ECHO|BYTE|BYTES|WORD|WORDS|LONG|DC.[BWTL]|DC|DV|TEXT|INCLUDE|INCBIN|IMPORT|CONST|LABEL|STRING|UNDEF|INCSYM|LABPOOL|POOL|IF|IFDEF|ELSE|ELIF|ENDIF|STRUCT|ENUM|REPT|REPEAT|INCDIR|A16|A8|XY16|XY8|I16|I8|DUMMY|DUMMY_END|DS|ABORT|ERR)|\\s+ert)\\b",
"name": "meta.directive",
"comment": "Assembler Control"
},
{
"match": "(?i)((^|\\s+)(XDEF|XREF|SECTION|SEG|SEGMENT|MERGE|LINK|INCOBJ)|\\s+ert)\\b",
"name": "meta.segment",
"comment": "Segment Control"
},
{
"match": "\\b(adc|and|asl|bit|clc|cld|cli|clv|cmp|cpx|cpy|dec|dex|dey|eor|inc|inx|iny|lda|ldx|ldy|lsr|nop|ora|pha|php|pla|plp|rol|ror|sbc|sec|sed|sei|sta|stx|sty|tax|txa|tay|tya|tsx|txs|ADC|AND|ASL|BIT|CLC|CLD|CLI|CLV|CMP|CPX|CPY|DEC|DEX|DEY|EOR|INC|INX|INY|LDA|LDX|LDY|LSR|NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|SBC|SEC|SED|SEI|STA|STX|STY|TAX|TXA|TAY|TYA|TSX|TXS)\\b",
"name": "keyword.other.opcode.instruction"
},
{
"match":
"\\b(bcc|bcs|beq|bmi|bne|bpl|brk|bvc|bvs|jmp|jsr|rti|rts|BCC|BCS|BEQ|BMI|BNE|BPL|BRK|BVC|BVS|JMP|JSR|RTI|RTS)\\b",
"name": "keyword.other.opcode.pc"
},
{
"match": "\\b(aso|rln|lse|rrd|sax|lax|dcp|isb|anc|alr|arr|ane|anx|sbx|las|sha|shs|shx|shy|npo|cim|dop|top)\\b",
"name": "keyword.other.opcode.6502.illegal"
},
{
"begin": "/\\*",
"end": "\\*/",
"name": "comment.block"
},
{
"match": "//.*",
"name": "comment.line.double-slash"
},
{
"match": ";.*",
"name": "comment.line.semicolon"
},
{
"match": "^\\S*\\s*(\\*.*)",
"captures": {
"1": { "name": "comment.line.asterisk" }
}
},
{
"begin": "'",
"end": "'",
"name": "string.quoted.single"
},
{
"begin": "\"",
"end": "\"",
"name": "string.quoted.double"
},
{
"match": "(?i)(?<=,)\\s*[xy]\\b(?!.*\\.reg)",
"name":
"constant.language.registers"
},
{
"match": "\\b[0-9]+\\b",
"name":
"constant.numeric.decimal"
},
{
"match": "(?i)\\$\\b\\h+\\b|\\b0x\\h+\\b",
"name": "constant.numeric.hexadecimal"
},
{
"match": "%\\b[0-1]+\\b",
"name": "constant.numeric.binary"
},
{
"match": "(?i)(^|\\s+)align\\b",
"name": "storage.modifier"
},
{
"match": "(?i)(^|\\s+)[\\!\\.][a-zA-Z0-9_]+\\b",
"name": "label.local"
},
{
"match": "(?i)(^|\\s+)[!\\!\\.][a-zA-Z0-9_]+\\b",
"name": "label.global"
},
{
"match": "(?i)[\\!\\%]\\b",
"name": "label.scope"
},
{
"match": "(?i)[+\\-*/%!|^=~\\:&<>;]",
"name": "constant.language"
}
],
"scopeName": "source.asm.6502.x65",
"uuid": "3a93182b-9647-4133-bead-cd118e3ed088"
}

View File

@ -1,237 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>x65</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
<dict>
<key>background</key>
<string>#000048</string>
<key>caret</key>
<string>#ffffff</string>
<key>foreground</key>
<string>#eeee88</string>
<key>invisibles</key>
<string>#3B3A32</string>
<key>lineHighlight</key>
<string>#40406060</string>
<key>selection</key>
<string>#0088ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Comment</string>
<key>scope</key>
<string>comment</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#cc44cc</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>String</string>
<key>scope</key>
<string>string</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#00cc55</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>SegmentControl</string>
<key>scope</key>
<string>control.segment</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#a0ff80</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Number</string>
<key>scope</key>
<string>constant.numeric</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#77e0c0</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Directive</string>
<key>scope</key>
<string>directive</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#40b0ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Built-in constant</string>
<key>scope</key>
<string>constant.language</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#c090ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>User-defined constant</string>
<key>scope</key>
<string>constant.character, constant.other</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#c0a040</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Variable</string>
<key>scope</key>
<string>variable</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#a9fdac</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Keyword</string>
<key>scope</key>
<string>keyword</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#ff7979</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Storage</string>
<key>scope</key>
<string>storage</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#dede79</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>LocalLabel</string>
<key>scope</key>
<string>label.local</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#a0c0ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>GlobalLabel</string>
<key>scope</key>
<string>label.global</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#80ffa0</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>ScopeLabel</string>
<key>scope</key>
<string>label.scope</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#ff80a0</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Function name</string>
<key>scope</key>
<string>entity.name.function</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#8cdaff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Tag name</string>
<key>scope</key>
<string>entity.name.tag</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#88ddbb</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Library constant</string>
<key>scope</key>
<string>support.constant</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#ecfdb9</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Invalid</string>
<key>scope</key>
<string>invalid</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#f92649</string>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#F8F8F0</string>
</dict>
</dict>
</array>
<key>uuid</key>
<string>38b4e4f7-c037-42d5-8ccc-eda7c052d512</string>
<key>colorSpaceName</key>
<string>sRGB</string>
</dict>
</plist>

138
vscode/x65.tmTheme.json Normal file
View File

@ -0,0 +1,138 @@
{
"name": "x65",
"settings": [
{
"settings": {
"background": "#100048",
"caret": "#ffffff",
"foreground": "#eeee88",
"invisibles": "#3B3A32",
"lineHighlight": "#40406060",
"selection": "#0088ff"
}
},
{
"name": "Comment",
"scope": "comment",
"settings": { "foreground": "#cc44cc" }
},
{
"name": "String",
"scope": "string",
"settings": { "foreground": "#00cc55" }
},
{
"name": "SegmentControl",
"scope": "meta.segment",
"settings": { "foreground": "#a0ff80" }
},
{
"name": "Number",
"scope": "constant.numeric",
"settings": { "foreground": "#77e0c0" }
},
{
"name": "Directive",
"scope": "meta.directive",
"settings": { "foreground": "#40b0ff" }
},
{
"name": "Built-in constant",
"scope": "constant.language",
"settings": { "foreground": "#c090ff" }
},
{
"name": "User-defined constant",
"scope": "constant.character, constant.other",
"settings": { "foreground": "#c0a040" }
},
{
"name": "Variable",
"scope": "variable",
"settings": { "foreground": "#a9fdac" }
},
{
"name": "Keyword",
"scope": "keyword",
"settings": { "foreground": "#79ff79" }
},
{
"name": "Instruction",
"scope": "keyword.other.opcode",
"settings": { "foreground": "#ff7979" }
},
{
"name": "PC Instruction",
"scope": "keyword.other.opcode.pc",
"settings": { "foreground": "#ff5979" }
},
{
"name": "Storage",
"scope": "storage",
"settings": {
"fontStyle": "",
"foreground": "#dede79"
}
},
{
"name": "LocalLabel",
"scope": "label.local",
"settings": {
"fontStyle": "",
"foreground": "#a0c0ff"
}
},
{
"name": "GlobalLabel",
"scope": "label.global",
"settings": {
"fontStyle": "",
"foreground": "#80ffa0"
}
},
{
"name": "ScopeLabel",
"scope": "label.scope",
"settings": {
"fontStyle": "",
"foreground": "#ff80a0"
}
},
{
"name": "Function name",
"scope": "entity.name.function",
"settings": {
"fontStyle": "",
"foreground": "#8cdaff"
}
},
{
"name": "Tag name",
"scope": "entity.name.tag",
"settings": {
"fontStyle": "",
"foreground": "#88ddbb"
}
},
{
"name": "Library constant",
"scope": "support.constant",
"settings": {
"fontStyle": "",
"foreground": "#ecfdb9"
}
},
{
"name": "Invalid",
"scope": "invalid",
"settings": {
"background": "#f92649",
"fontStyle": "",
"foreground": "#F8F8F0"
}
}
],
"uuid": "38b4e4f7-c037-42d5-8ccc-efa7c052d512",
"colorSpaceName": "sRGB"
}