rouge-ruby / rouge

A pure Ruby code highlighter that is compatible with Pygments
https://rouge.jneen.net/
Other
3.3k stars 732 forks source link

Added 'gnuasm' lexer #2010

Open mpartel opened 7 months ago

mpartel commented 7 months ago

Adds a lexer for GNU Assembler.

This is based on nasm.rb and might retain some NASMisms. The most important differences to NASM: GNU Assembler directives start with ., registers start with %, and comment syntax is different.

This declares the same file extension '*.s' as 'armasm', ~so this PR removes armasm_spec.rb, which tested guessing by file extension. Is there a better way to handle this ambiguity?~ so added a disambiguation rule.

mpartel commented 7 months ago

Added disambiguation rule.