source: node_modules/refractor/lang/nasm.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 981 bytes
RevLine 
[d24f17c]1'use strict'
2
3module.exports = nasm
4nasm.displayName = 'nasm'
5nasm.aliases = []
6function nasm(Prism) {
7 Prism.languages.nasm = {
8 comment: /;.*$/m,
9 string: /(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,
10 label: {
11 pattern: /(^\s*)[A-Za-z._?$][\w.?$@~#]*:/m,
12 lookbehind: true,
13 alias: 'function'
14 },
15 keyword: [
16 /\[?BITS (?:16|32|64)\]?/,
17 {
18 pattern: /(^\s*)section\s*[a-z.]+:?/im,
19 lookbehind: true
20 },
21 /(?:extern|global)[^;\r\n]*/i,
22 /(?:CPU|DEFAULT|FLOAT).*$/m
23 ],
24 register: {
25 pattern:
26 /\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|di|si|sp)|[cdefgs]s)\b/i,
27 alias: 'variable'
28 },
29 number:
30 /(?:\b|(?=\$))(?:0[hx](?:\.[\da-f]+|[\da-f]+(?:\.[\da-f]+)?)(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i,
31 operator: /[\[\]*+\-\/%<>=&|$!]/
32 }
33}
Note: See TracBrowser for help on using the repository browser.