Merge branch 'master' into develop

This commit is contained in:
Georg Ziegler 2018-06-04 21:41:19 +02:00
commit 52375b7e6e
3 changed files with 66 additions and 117 deletions

View File

@ -0,0 +1,65 @@
'fileTypes': []
'foldingStartMarker': '/\\*\\*|\\{\\s*$'
'foldingStopMarker': '\\*\\*/|^\\s*\\}'
'name': '6502 Assembly (DASM)'
'patterns': [
{
'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)\\b'
'name': 'keyword'
}
{
'match': '\\b(bcc|bcs|beq|bmi|bne|bpl|brk|bvc|bvs|jmp|jsr|rti|rts)\\b'
'name': 'keyword.control'
}
{
'captures':
'1':
'name': 'punctuation.definition.comment'
'match': '(;).*$\\n?'
'name': 'comment.line.semicolon'
}
{
'match': '\\b(SET|WORD|BYTE|HEX)\\b'
'name': 'storage.type'
}
{
'match': '\\b(ALIGN)\\b'
'name': 'storage.modifier'
}
{
'match': '\\b(REPEAT|REPEND|MAC|ENDM|SUBROUTINE)\\b'
'name': 'support.function'
}
{
'match': '\\b(processor|org)\\b'
'name': 'constant.language'
}
{
'begin': '"'
'end': '"'
'name': 'string.quoted.double.untitled'
'patterns': [
{
'match': '\\\\.'
'name': 'constant.character.escape.untitled'
}
]
}
{
'match': '^[A-Za-z_][A-Za-z0-9_]*'
'name': 'entity.name.label'
}
{
'match': '^\\.[A-Za-z_][A-Za-z0-9_]*'
'name': 'entity.name.label.local'
}
{
'match': '#?\\$[0-9a-fA-F]+'
'name': 'constant.numeric.hex'
}
{
'match': '{[0-9]+}'
'name': 'variable.parameter.macro'
}
]
'scopeName': 'source.assembly.6502.dasm'

View File

@ -1,116 +0,0 @@
# Syntax Highlighting for 6502 programming with DASM
# Improvements: absolut addresses/numbers, equ, seg, ds, word
# Not working: labels
scopeName: 'source.assembly.6502.dasm-6502' # Prevents conflicts with other architectures supported by dasm
name: '6502 Assembly (DASM)' # Name shown in Atom Editor grammar selection'fileTypes': []
foldingStartMarker: '/\\*\\*|\\{\\s*$'
foldingStopMarker: '\\*\\*/|^\\s*\\}'
# File extensions associated with this grammar
fileTypes: []
# include all opcodes and directives the toolchain supports
patterns: [
{ include: 'source.6502-opcodes' } # include basic 6502 instruction set
{ include: '#comments' }
{ include: '#directives' }
{ include: '#symbols' }
]
# Repository starts here ------------------------------------------------------
repository:
# comments
comments:
patterns: [
# semicolon comments
{
# captures:
# 1:
# name: 'punctuation.definition.comment'
match: '(;).*$\\n?'
name: 'comment.line.semicolon.dasm-6502'
}
]
# symbols
symbols:
patterns: [
# strings
{
begin: '"'
end: '"'
name: 'string.quoted.double.untitled.dasm-6502'
patterns: [
{
match: '\\\\.'
name: 'constant.character.escape.untitled.dasm-6502'
}
]
}
# labels
{
match: '^[A-Za-z_][A-Za-z0-9_]*'
name: 'entity.name.label.dasm-6502'
}
# local labels
{
match: '^\\.[A-Za-z_][A-Za-z0-9_]*'
name: 'entity.name.label.local.dasm-6502'
}
# absolut address/number
{
match: '\\#(\'.\'|[^\\s\']+)'
name: 'constant.numeric.hex.cc65-directives'
}
# binary numbers
{
match: '%[01]+'
name: 'constant.numeric.binary.dasm-6502'
}
# decimal numbers
{
match: '\\b([0-9]+)\\b'
name: 'constant.numeric.decimal.dasm-6502'
}
# hex numbers
{
match: '\\$[0-9a-fA-F]+'
name: 'constant.numeric.hex.dasm-6502'
}
# macro parameters
{
match: '{[0-9]+}'
name: 'variable.parameter.macro.dasm-6502'
}
]
#
# assembler directives
directives:
patterns: [
# data directives
{
match: '\\b(?i:SET|WORD|.?BYTE|HEX|DS|.?WORD)\\b'
name: 'storage.type.dasm-6502'
}
# linker directives
{
match: '\\b(?i:ALIGN)\\b'
name: 'storage.modifier.dasm-6502'
}
# subroutines and macros
{
match: '\\b(?i:REPEAT|REPEND|MAC|ENDM|SUBROUTINE|INCLUDE)\\b'
name: 'support.function.dasm-6502'
}
# processor and org
{
match: '\\b(?i:processor|org)\\b'
name: 'constant.language.dasm-6502'
}
# pseudo opcodes
{
match: '\\b(?i:equ|seg(\\.u)?)\\b'
name: 'support.function.pseudo.dasm-6502'
}
]

View File

@ -1,6 +1,6 @@
{
"name": "language-65asm",
"version": "6.1.0",
"version": "8.0.0",
"description": "Adds syntax highlighting to 65816/65C816/65802/6502/65C02 files in Atom, with extra support for various compilers.",
"repository": "git@github.com:MatthewCallis/language-65asm.git",
"license": "MIT",