lib/rouge/lexers/nasm.rb in rouge-4.2.0 vs lib/rouge/lexers/nasm.rb in rouge-4.2.1

- old
+ new

@@ -12,15 +12,16 @@ tag 'nasm' filenames '*.asm' mimetypes 'text/x-nasm' state :root do - rule %r/^\s*%/, Comment::Preproc, :preproc + rule %r/^\s*%/, Comment::Preproc, :preproc - mixin :whitespace + mixin :whitespace + mixin :punctuation - rule %r/[a-z$._?][\w$.?#@~]*:/i, Name::Label + rule %r/[a-z$._?][\w$.?#@~]*:/i, Name::Label rule %r/([a-z$._?][\w$.?#@~]*)(\s+)(equ)/i do groups Name::Constant, Keyword::Declaration, Keyword::Declaration push :instruction_args end @@ -30,10 +31,10 @@ rule %r/[\r\n]+/, Text end state :instruction_args do - rule %r/"(\\\\"|[^"\\n])*"|'(\\\\'|[^'\\n])*'|`(\\\\`|[^`\\n])*`/, Str + rule %r/"(\\\\"|[^"\\n])*"|'(\\\\'|[^'\\n])*'|`(\\\\`|[^`\\n])*`/, Str rule %r/(?:0x[\da-f]+|$0[\da-f]*|\d+[\da-f]*h)/i, Num::Hex rule %r/[0-7]+q/i, Num::Oct rule %r/[01]+b/i, Num::Bin rule %r/\d+\.e?\d+/i, Num::Float rule %r/\d+/, Num::Integer