asm.nanorc 783 B

123456789101112131415161718
  1. ## Here is an example for assembler.
  2. ##
  3. syntax "asm" "\.(S|s|asm)$"
  4. color red "\<[A-Z_]{2,}\>"
  5. color brightgreen "\.(data|subsection|text)"
  6. color green "\.(align|file|globl|global|hidden|section|size|type|weak)"
  7. color brightyellow "\.(ascii|asciz|byte|double|float|hword|int|long|short|single|struct|word)"
  8. icolor brightred "^[[:space:]]*[.0-9A-Z_]*:"
  9. color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)"
  10. ## Highlight strings (note: VERY resource intensive)
  11. color brightyellow "<[^= ]*>" ""(\\.|[^"])*""
  12. color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
  13. ## Highlight comments
  14. color brightblue "//.*"
  15. color brightblue start="/\*" end="\*/"
  16. ## Highlight trailing whitespace
  17. color ,green "[[:space:]]+$"