Skip to content

Commit 8605b6c

Browse files
committed
Update Prism to 1.28.0
There are now 290 (from 277) syntaxes supported. See: <https://github.com/PrismJS/prism/blob/master/CHANGELOG.md#1280-2022-04-17>
1 parent 6708c7f commit 8605b6c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1283
-160
lines changed

lang/abap.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lang/ada.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@ export default function ada(Prism) {
1616
pattern: /\b\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:E[+-]?\d(?:_?\d)*)?\b/i
1717
}
1818
],
19-
'attr-name': /\b'\w+/,
19+
attribute: {
20+
pattern: /\b'\w+/,
21+
alias: 'attr-name'
22+
},
2023
keyword:
21-
/\b(?:abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case|constant|declare|delay|delta|digits|do|else|elsif|end|entry|exception|exit|for|function|generic|goto|if|in|interface|is|limited|loop|mod|new|not|null|of|others|out|overriding|package|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|return|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor)\b/i,
24+
/\b(?:abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case|constant|declare|delay|delta|digits|do|else|elsif|end|entry|exception|exit|for|function|generic|goto|if|in|interface|is|limited|loop|mod|new|not|null|of|or|others|out|overriding|package|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|return|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor)\b/i,
2225
boolean: /\b(?:false|true)\b/i,
2326
operator: /<[=>]?|>=?|=>?|:=|\/=?|\*\*?|[&+-]/,
2427
punctuation: /\.\.?|[,;():]/,

lang/armasm.js

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
// @ts-nocheck
2+
armasm.displayName = 'armasm'
3+
armasm.aliases = ['arm-asm']
4+
5+
/** @type {import('../core.js').Syntax} */
6+
export default function armasm(Prism) {
7+
Prism.languages.armasm = {
8+
comment: {
9+
pattern: /;.*/,
10+
greedy: true
11+
},
12+
string: {
13+
pattern: /"(?:[^"\r\n]|"")*"/,
14+
greedy: true,
15+
inside: {
16+
variable: {
17+
pattern: /((?:^|[^$])(?:\${2})*)\$\w+/,
18+
lookbehind: true
19+
}
20+
}
21+
},
22+
char: {
23+
pattern: /'(?:[^'\r\n]{0,4}|'')'/,
24+
greedy: true
25+
},
26+
'version-symbol': {
27+
pattern: /\|[\w@]+\|/,
28+
greedy: true,
29+
alias: 'property'
30+
},
31+
boolean: /\b(?:FALSE|TRUE)\b/,
32+
directive: {
33+
pattern:
34+
/\b(?:ALIAS|ALIGN|AREA|ARM|ASSERT|ATTR|CN|CODE|CODE16|CODE32|COMMON|CP|DATA|DCB|DCD|DCDO|DCDU|DCFD|DCFDU|DCI|DCQ|DCQU|DCW|DCWU|DN|ELIF|ELSE|END|ENDFUNC|ENDIF|ENDP|ENTRY|EQU|EXPORT|EXPORTAS|EXTERN|FIELD|FILL|FN|FUNCTION|GBLA|GBLL|GBLS|GET|GLOBAL|IF|IMPORT|INCBIN|INCLUDE|INFO|KEEP|LCLA|LCLL|LCLS|LTORG|MACRO|MAP|MEND|MEXIT|NOFP|OPT|PRESERVE8|PROC|QN|READONLY|RELOC|REQUIRE|REQUIRE8|RLIST|ROUT|SETA|SETL|SETS|SN|SPACE|SUBT|THUMB|THUMBX|TTL|WEND|WHILE)\b/,
35+
alias: 'property'
36+
},
37+
instruction: {
38+
pattern:
39+
/((?:^|(?:^|[^\\])(?:\r\n?|\n))[ \t]*(?:(?:[A-Z][A-Z0-9_]*[a-z]\w*|[a-z]\w*|\d+)[ \t]+)?)\b[A-Z.]+\b/,
40+
lookbehind: true,
41+
alias: 'keyword'
42+
},
43+
variable: /\$\w+/,
44+
number:
45+
/(?:\b[2-9]_\d+|(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e-?\d+)?|\b0(?:[fd]_|x)[0-9a-f]+|&[0-9a-f]+)\b/i,
46+
register: {
47+
pattern: /\b(?:r\d|lr)\b/,
48+
alias: 'symbol'
49+
},
50+
operator: /<>|<<|>>|&&|\|\||[=!<>/]=?|[+\-*%#?&|^]|:[A-Z]+:/,
51+
punctuation: /[()[\],]/
52+
}
53+
Prism.languages['arm-asm'] = Prism.languages.armasm
54+
}

0 commit comments

Comments
 (0)