Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(558)

Unified Diff: lib/src/prism/components/prism-nasm.js

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/prism/components/prism-monkey.min.js ('k') | lib/src/prism/components/prism-nasm.min.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/prism/components/prism-nasm.js
diff --git a/lib/src/prism/components/prism-nasm.js b/lib/src/prism/components/prism-nasm.js
index b10725451f82d986317ef8227ec20e22c69b8508..b47af8c990fc20945260b57326ae6e2836428bbd 100644
--- a/lib/src/prism/components/prism-nasm.js
+++ b/lib/src/prism/components/prism-nasm.js
@@ -1,20 +1,24 @@
Prism.languages.nasm = {
- 'comment': /;.*$/m,
- 'string': /("|'|`)(\\?.)*?\1/m,
- 'label': {
- pattern: /^\s*[A-Za-z\._\?\$][\w\.\?\$@~#]*:/m,
- alias: 'function'
- },
- 'keyword': [
- /\[?BITS (16|32|64)\]?/m,
- /^\s*section\s*[a-zA-Z\.]+:?/im,
- /(?:extern|global)[^;]*/im,
- /(?:CPU|FLOAT|DEFAULT).*$/m
- ],
- 'register': {
- pattern: /\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(bp|sp|si|di)|[cdefgs]s)\b/i,
- alias: 'variable'
- },
- 'number': /(\b|-|(?=\$))(0[hx][\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+(\.?e[+-]?\d+)?[dt]?)\b/i,
- 'operator': /[\[\]\*+\-\/%<>=&|\$!]/m
+ 'comment': /;.*$/m,
+ 'string': /("|'|`)(\\?.)*?\1/m,
+ 'label': {
+ pattern: /(^\s*)[A-Za-z._?$][\w.?$@~#]*:/m,
+ lookbehind: true,
+ alias: 'function'
+ },
+ 'keyword': [
+ /\[?BITS (16|32|64)\]?/m,
+ {
+ pattern: /(^\s*)section\s*[a-zA-Z\.]+:?/im,
+ lookbehind: true
+ },
+ /(?:extern|global)[^;\r\n]*/im,
+ /(?:CPU|FLOAT|DEFAULT).*$/m
+ ],
+ 'register': {
+ pattern: /\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(bp|sp|si|di)|[cdefgs]s)\b/i,
+ alias: 'variable'
+ },
+ 'number': /(\b|-|(?=\$))(0[hx][\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+(\.?e[+-]?\d+)?[dt]?)\b/i,
+ 'operator': /[\[\]*+\-\/%<>=&|$!]/
};
« no previous file with comments | « lib/src/prism/components/prism-monkey.min.js ('k') | lib/src/prism/components/prism-nasm.min.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698