Skip to content

Commit 809af0d

Browse files
authoredDec 10, 2021
Reason: Use standard tokens correctly (#3251)
1 parent 4049e5c commit 809af0d

File tree

4 files changed

+24
-27
lines changed

4 files changed

+24
-27
lines changed
 

‎components/prism-reason.js

+4-7
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@ Prism.languages.reason = Prism.languages.extend('clike', {
99
'operator': /\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/
1010
});
1111
Prism.languages.insertBefore('reason', 'class-name', {
12-
'character': {
12+
'char': {
1313
pattern: /'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,
14-
alias: 'string'
15-
},
16-
'constructor': {
17-
// Negative look-ahead prevents from matching things like String.capitalize
18-
pattern: /\b[A-Z]\w*\b(?!\s*\.)/,
19-
alias: 'variable'
14+
greedy: true
2015
},
16+
// Negative look-ahead prevents from matching things like String.capitalize
17+
'constructor': /\b[A-Z]\w*\b(?!\s*\.)/,
2118
'label': {
2219
pattern: /\b[a-z]\w*(?=::)/,
2320
alias: 'symbol'

‎components/prism-reason.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
'a'
2+
'\''
3+
'\\'
4+
'\xff'
5+
'\o214'
6+
7+
----------------------------------------------------
8+
9+
[
10+
["char", "'a'"],
11+
["char", "'\\''"],
12+
["char", "'\\\\'"],
13+
["char", "'\\xff'"],
14+
["char", "'\\o214'"]
15+
]
16+
17+
----------------------------------------------------
18+
19+
Checks for characters.

‎tests/languages/reason/character_feature.test

-19
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.