Skip to content

Commit de38144

Browse files
author
Nathan Ho
committed
[scdoc] Highlight scale degree literals
1 parent ae46dd8 commit de38144

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

HelpSource/editor.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const init = () => {
66
{ regex: /^(?:arg|classvar|const|super|this|var)\b/, token: 'keyword' },
77
{ regex: /^(?:false|inf|nil|true|thisFunction|thisFunctionDef|thisMethod|thisProcess|thisThread|currentEnvironment|topEnvironment)\b/, token: 'built-in' },
88
{ regex: /^\b\d+r[0-9a-zA-Z]*(\.[0-9A-Z]*)?/, token: 'number radix-float' },
9+
{ regex: /^\b\d+(s+|b+|[sb]\d+)\b/, token: 'number scale-degree' },
910
{ regex: /^\b((\d+(\.\d+)?([eE][-+]?\d+)?(pi)?)|pi)\b/, token: 'number float' },
1011
{ regex: /^\b0(x|X)(\d|[a-f]|[A-F])+/, token: 'number hex-int' },
1112
{ regex: /^\b[A-Za-z_]\w*\:/, token: 'symbol symbol-arg' },
@@ -36,7 +37,7 @@ const init = () => {
3637
value: code,
3738
lineWrapping: true,
3839
viewportMargin: Infinity,
39-
extraKeys: {
40+
extraKeys: {
4041
'Shift-Enter': evalLine
4142
}
4243
})
@@ -118,7 +119,7 @@ const selectRegion = (options = { flash: true }) => {
118119
/* no parens found */
119120
if (parenPairs.length === 0)
120121
return selectLine(options)
121-
122+
122123
let pair = parenPairs.pop()
123124
leftCursor = pair[0]
124125
rightCursor = pair[1]

0 commit comments

Comments
 (0)