rendered paste body{ scopeName = 'source.z80asm';
fileTypes = ( 'z80', 'asm' );
patterns = (
{ name = 'string.quoted.double.z80asm';
begin = '"';
end = '"';
patterns = (
{ name = 'constant.character.escape.z80asm';
match = '\\.';
},
);
},
{ name = 'comment.line.z80asm';
match = '(;).*$\n?';
},
{ name = 'constant.numeric.decimal.z80asm';
match = '\b[0-9]+(d{0,1})\b';
},
{ name = 'constant.numeric.hexadecimal.z80asm';
match = '(^|(?<=\s))(\$[0-9A-F]+|[0-9A-Fa-f]+h)\b';
},
{ name = 'constant.numeric.binary.z80asm';
match = '(^|(?<=\s))(%[0-1]+|[0-9]+b)\b';
},
{ name = 'constant.numeric.octal.z80asm';
match = '(^|(?<=\s))(@[0-9]+|[0-9]+o)\b';
},
{ name = 'keyword.control.import.z80asm';
match = '^\s*#\s*include\b\s+';
beginCaptures = { 1 = { name = 'keyword.control.import.define.c'; }; };
},
{ name = 'keyword.control.import.define.z80asm';
match = '^\s*#\s*define\s+(.+?(\(.+?\)){0,1})(\s+)(.+)$';
beginCaptures = {
1 = { name = 'constant.define.z80asm'; };
4 = { name = 'meta.preprocessor.z80asm'; };
};
},
{ name = 'keyword.z80asm';
match = '((^|(?<=\s))\.(\w+)\b)|\b(equ|EQU|db|DB|end|END)\b|=';
},
{ name = 'entity.name.function.label.z80asm';
match = '^(\s*)(\w+):';
},
{ name = 'support.function.z80asm';
match = '\b(b(_call|call)|ld|ret)\b';
},
{ name = 'support.constant.z80asm';
match = '\b(_(\w+))\b';
},
{ name = 'support.variable.z80asm';
match = '\b(a|b|c|f|hl|bc|de|ix)\b';
},
);
}