Commit f64e3f55 authored by Marc's avatar Marc
Browse files


parent ffecfeff
It lexes our version of mixed C ans assembly.
Install it with
sudo ./
and the lexer will be available under the name `casm`. You can check
it was indeed correctly installed by looking for it in
pygmentize -L
or more automatically
pygmentize -L | grep casm -A1
I get:
* casm:
c-asm (filenames *.c_asm)
And is ready to use with minted, for instance!
int x = 5;
void f() {
asm {
mov EAX, x
......@@ -64,7 +64,7 @@ class CWithAsmBlockLexer(RegexLexer):
(r'(__m(128i|128d|128|64))\b', Keyword.Reserved),
# Microsoft-isms
'asm', 'int8', 'based', 'except', 'int16', 'stdcall', 'cdecl',
'int8', 'based', 'except', 'int16', 'stdcall', 'cdecl',
'fastcall', 'int32', 'declspec', 'finally', 'int64', 'try',
'leave', 'wchar_t', 'w64', 'unaligned', 'raise', 'noop',
'identifier', 'forceinline', 'assume'),
......@@ -186,3 +186,4 @@ class CAsmLexer(DelegatingLexer):
filenames = ['*.c_asm']
def __init__(self, **options):
super(CAsmLexer, self).__init__(NasmLexer, CWithAsmBlockLexer, **options)
# Will probably need sudo
python3 develop
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment