David Lawrence Ramsey | 5e6434c | 2006-06-01 17:23:28 +0000 | [diff] [blame] | 1 | ## Here is an example for assembler. |
Benno Schulenberg | fe9da94 | 2014-05-16 20:21:34 +0000 | [diff] [blame] | 2 | |
David Lawrence Ramsey | 5e6434c | 2006-06-01 17:23:28 +0000 | [diff] [blame] | 3 | syntax "asm" "\.(S|s|asm)$" |
Chris Allegretta | b00d0b9 | 2011-02-13 04:23:10 +0000 | [diff] [blame] | 4 | magic "[Aa]ssembl(y|er)" |
Mike Scalora | 6a2032f | 2016-05-25 22:13:50 +0200 | [diff] [blame] | 5 | comment "//" |
Benno Schulenberg | fe9da94 | 2014-05-16 20:21:34 +0000 | [diff] [blame] | 6 | |
David Lawrence Ramsey | 5e6434c | 2006-06-01 17:23:28 +0000 | [diff] [blame] | 7 | color red "\<[A-Z_]{2,}\>" |
| 8 | color brightgreen "\.(data|subsection|text)" |
| 9 | color green "\.(align|file|globl|global|hidden|section|size|type|weak)" |
| 10 | color brightyellow "\.(ascii|asciz|byte|double|float|hword|int|long|short|single|struct|word)" |
| 11 | icolor brightred "^[[:space:]]*[.0-9A-Z_]*:" |
| 12 | color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)" |
Benno Schulenberg | fe9da94 | 2014-05-16 20:21:34 +0000 | [diff] [blame] | 13 | |
| 14 | # Strings. |
David Lawrence Ramsey | 5e6434c | 2006-06-01 17:23:28 +0000 | [diff] [blame] | 15 | color brightyellow "<[^= ]*>" ""(\\.|[^"])*"" |
Benno Schulenberg | ae598e7 | 2015-12-29 16:48:25 +0000 | [diff] [blame] | 16 | # 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 Schulenberg | fe9da94 | 2014-05-16 20:21:34 +0000 | [diff] [blame] | 19 | |
| 20 | # Comments. |
David Lawrence Ramsey | 5e6434c | 2006-06-01 17:23:28 +0000 | [diff] [blame] | 21 | color brightblue "//.*" |
| 22 | color brightblue start="/\*" end="\*/" |
Benno Schulenberg | fe9da94 | 2014-05-16 20:21:34 +0000 | [diff] [blame] | 23 | |
| 24 | # Trailing whitespace. |
David Lawrence Ramsey | e081fb9 | 2007-04-11 22:18:16 +0000 | [diff] [blame] | 25 | color ,green "[[:space:]]+$" |