blob: 228a185f6a17f8e00ca0fc38188d1b240c3b7ea6 [file] [log] [blame]
David Lawrence Ramsey5e6434c2006-06-01 17:23:28 +00001## Here is an example for assembler.
Benno Schulenbergfe9da942014-05-16 20:21:34 +00002
David Lawrence Ramsey5e6434c2006-06-01 17:23:28 +00003syntax "asm" "\.(S|s|asm)$"
Chris Allegrettab00d0b92011-02-13 04:23:10 +00004magic "[Aa]ssembl(y|er)"
Mike Scalora6a2032f2016-05-25 22:13:50 +02005comment "//"
Benno Schulenbergfe9da942014-05-16 20:21:34 +00006
David Lawrence Ramsey5e6434c2006-06-01 17:23:28 +00007color red "\<[A-Z_]{2,}\>"
8color brightgreen "\.(data|subsection|text)"
9color green "\.(align|file|globl|global|hidden|section|size|type|weak)"
10color brightyellow "\.(ascii|asciz|byte|double|float|hword|int|long|short|single|struct|word)"
11icolor brightred "^[[:space:]]*[.0-9A-Z_]*:"
12color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)"
Benno Schulenbergfe9da942014-05-16 20:21:34 +000013
14# Strings.
David Lawrence Ramsey5e6434c2006-06-01 17:23:28 +000015color brightyellow "<[^= ]*>" ""(\\.|[^"])*""
Benno Schulenbergae598e72015-12-29 16:48:25 +000016# Multiline strings. This regex is VERY resource intensive,
17# and sometimes colours things that shouldn't be coloured.
18###color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
Benno Schulenbergfe9da942014-05-16 20:21:34 +000019
20# Comments.
David Lawrence Ramsey5e6434c2006-06-01 17:23:28 +000021color brightblue "//.*"
22color brightblue start="/\*" end="\*/"
Benno Schulenbergfe9da942014-05-16 20:21:34 +000023
24# Trailing whitespace.
David Lawrence Ramseye081fb92007-04-11 22:18:16 +000025color ,green "[[:space:]]+$"