diff options
author | Matthew Fernandez <matthew.fernandez@gmail.com> | 2016-03-17 11:00:16 +1100 |
---|---|---|
committer | Matthew Fernandez <matthew.fernandez@gmail.com> | 2016-03-17 11:00:16 +1100 |
commit | e7e5093f706560ac019dd03b0c25ae240cbfabf5 (patch) | |
tree | debc99486018137d0da44fee0c8c38e8e336331d /pygments/lexers/objective.py | |
parent | 6eb91712fb4217edbbd2423690f9f85365ded00a (diff) | |
download | pygments-git-e7e5093f706560ac019dd03b0c25ae240cbfabf5.tar.gz |
Add 'asm' as a C keyword.
The C standards allow the use of inline assembly with the `asm` keyword (see
?J.5.10 of C99 for example). This commit adds 'asm' as a supported keyword to
the base C lexer, `CFamilyLexer`, and removes it from `CppLexer` which inherits
from this base. The intended effect is supporting the `asm` keyword for the C
lexer, while leaving the behaviour of the C++ lexer identical.
Side-effects of adding this keyword are that 'asm' is now also supported as a
keyword in the following lexers:
- CUDA. Inline PTX assembler is supported in CUDA with this syntax, so this is
correct.
- eC. It claims to be a superset of C, so this is correct.
- nesC. As far as I can tell, nesC supports inline assembly through the same
syntax, so this is correct.
- Objective-C. I believe inline assembly is supported in Objective-C, but
using the keyword `__asm__` instead, so this is somewhat incorrect. However,
note that the Objective-C++ lexer currently incorrectly supports `asm` as
well.
Closes #1219
Diffstat (limited to 'pygments/lexers/objective.py')
0 files changed, 0 insertions, 0 deletions