Skip to content

Improve syntax highlighting for AArch64 assembly #274

@kbeyls

Description

@kbeyls

The syntax highlighting for the AArch64 assembly examples in the book isn't great.
At the moment, the gnuassembler language is selected to highlight these examples.

It doesn't recognize/highlight the AArch64 instructions correctly.
It also gets confused and highlights some operands as comments, see screenshots below

Image Image

The syntax highlighting is done using pandoc's syntax highlighting mechanism. That pandoc documentation states:

If you are not satisfied with the built-in highlighting, or you want to highlight a language that isn’t supported, you can use the --syntax-definition option to load a KDE-style XML syntax definition file. Before writing your own, have a look at KDE’s repository of syntax definitions.

It looks like there is a 32-bit Arm syntax highlighting file, but no AArch64 one in that KDE repo: https://github.com/KDE/syntax-highlighting/blob/master/data/syntax/asm-arm.xml.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions