| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
... which is not equivalent in Unicode mode
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GNU supports ARM syntax which uses notation like #1 for constants.
Currently this is handled like a comment which is incorrect.
Take the case of:
ldr r0, [r1, #0]
Right now the #0] would be treated like a comment and looks
very poor.
Was referenced in issue #627
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
|
| |
|
|
|
|
|
|
|
| |
x86_64 has 8 registers r8-r15. The current syntax only accepts them with
a trailing letter. The letter is used to indicate the register size.
However, r8 is also a valid register, for a 64 bit wide register.
For reference on the register names see https://www.cs.uaf.edu/2017/fall/cs301/reference/x86_64.html
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MIR is a human readable serialization format that's used to represent LLVM's
machine specific intermediate representation. It allows LLVM's developers to
see the state of the compilation process at various points, as well as test
individual pieces of the compiler. Our documentation for the format can be
found at https://llvm.org/docs/MIRLangRef.html.
Adding a lexer for this format will allow the LLVM documentation to contain
syntax highlighted examples of LLVM-MIR. Two lexers are included in this
change. 'llvm-mir' lexes the overall document format and delegates to 'llvm' and
'llvm-mir-body' as appropriate. 'llvm-mir-body' lexes the contents of the 'body:'
attribute and can be used directly to syntax highlight code examples without
including the document boilerplate.
Since the 'llvm-mir' lexer delegates to the 'llvm' lexer at times, this change
also adds the 'immarg' and 'willreturn' keywords to the 'llvm' lexer as these
were missing.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
NASM is much more popular than TASM, but get_lexer_for_filename('.asm') would
return TASM. Resolved by changing the NASM priority to 1, and adding an
analyse_text implementation to both NasmLexer and TasmLexer to help resolve
which one to use (PROC should be fairly common in TASM code.)
|
| |
|
|
|
|
|
|
|
| |
Directives were parsed independent of whitespace after them, which caused the
cpuid instruction to be parsed as CPU & id, instead of cpuid. We now expect a
whitespace character after a directive, which seems to match the Nasm
documentation.
|
| |
|
|
|
|
|
| |
Add to CHANGES, languages, add versionadded, recreate mappings, fix DASM16
alias.
|
|
|
|
|
|
|
|
|
| |
Lexers copied unmodified from
https://github.com/liluo/pygments-github-lexers
which is available under a 2-clause BSD license (same as pygments),
copyright 2012 to GitHub, Inc.
Fixes #1391 and #1150.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The keywords are based extracted from the source code
of the LLVM lexer (llvm-7.0.0.src/lib/AsmParser) and
is based on the first argument to the KEYWORD,
TYPEKEYWORD and INSTKEYWORD macros. The list of keywords
were then sorted in lexicographic order.
A diff with added and removed keywords is made available
at https://gist.github.com/mewmew/508e090a361095eeb60ffa88321e878a
Specifically the following 10 keywords were removed:
begin, dbg, end, free, getresult, linker_private,
linker_private, malloc, singlethread and x86_64_win64cc
And 96 new keywords were added.
|
|\
| |
| |
| | |
Fix handling of end-of-line comments in asm lexer
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When there is a comment after an instruction, e.g.
mov $1,%eax ; move 1 to eax
ret
the next instruction (ret above) is not properly highlighted. This
patch fixes that.
This was also reported in #1477.
|
|/
|
|
| |
Also, raise on warnings from Pygments only.
|
| |
|
|\ |
|
| | |
|
|\ \
| |/
|/|
| | |
LLVMLexer: added 58 keywords and 'token' type to match LLVM 4.0 (Issue #1263)
|
| | |
|
| |\ |
|
| | | |
|
| | | |
|
| | | |
|
| | |\ |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |/
| |
| |
| | |
I copied the nasm lexer and added or removed things that are different.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|
|
|
|
|
|
|
|
| |
Elixir syntax has evolved quite significantly since the initial lexer
was written. In this update I have rewritten most of the code to support
modern Elixir (as of v0.14.0-dev).
The example file has also been updated to give an quick overview
of most of the language constructs.
|
| |
|
|
This introduces support for some missing features to the Handlebars lexer:
Partials and path segments. Partials mostly appeared to work before, but the
`>` in `{{> ... }}` would appear as a syntax error, as could other
components of the partial. This change introduces support for:
* Standard partials: `{{> partialName}}`
* Partials with parameters: `{{> partialName varname="value"}}`
* Ddynamic partials: `{{> (partialFunc)}}`
* Ddynamic partials with lookups: `{{> (lookup ../path "partialName")}}`
* Partial blocks: `{{> @partial-block}}`
* Inline partials: `{{#*inline}}..{{/inline}}`
It also introduces support for path segments, which can reference content in
the current context or in a parent context. For instance, `this.name`,
`this/name`, `./name`, `../name`, `this/name`, etc. These are all now tracked
as variables.
|