Support calling methods on numbers with separators.
This commit is contained in:
parent
1dfa23b049
commit
5748210ea8
|
@ -10237,7 +10237,7 @@ LEVEL_ACCESS = <span class="hljs-number">6</span> <span class="hljs-comment">#
|
|||
|
||||
<div class="content"><div class='highlight'><pre>TAB = <span class="hljs-string">' '</span>
|
||||
|
||||
SIMPLENUM = <span class="hljs-regexp">/^[+-]?\d+$/</span>
|
||||
SIMPLENUM = <span class="hljs-regexp">/^[+-]?(?:\d(?:_?\d)*)+$/</span>
|
||||
SIMPLE_STRING_OMIT = <span class="hljs-regexp">/\s*\n\s*/g</span>
|
||||
LEADING_BLANK_LINE = <span class="hljs-regexp">/^[^\n\S]*\n/</span>
|
||||
TRAILING_BLANK_LINE = <span class="hljs-regexp">/\n[^\n\S]*$/</span>
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -29307,6 +29307,7 @@ test "Parser recognises binary numbers", ->
|
|||
test "call methods directly on numbers", ->
|
||||
eq 4, 4.valueOf()
|
||||
eq '11', 4.toString 3
|
||||
eq '1000', 1_000.toString()
|
||||
|
||||
eq -1, 3 -4
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -8758,7 +8758,7 @@
|
|||
// Tabs are two spaces for pretty printing.
|
||||
TAB = ' ';
|
||||
|
||||
SIMPLENUM = /^[+-]?\d+$/;
|
||||
SIMPLENUM = /^[+-]?(?:\d(?:_?\d)*)+$/;
|
||||
|
||||
SIMPLE_STRING_OMIT = /\s*\n\s*/g;
|
||||
|
||||
|
|
|
@ -5772,7 +5772,7 @@ LEVEL_ACCESS = 6 # ...[0]
|
|||
# Tabs are two spaces for pretty printing.
|
||||
TAB = ' '
|
||||
|
||||
SIMPLENUM = /^[+-]?\d+$/
|
||||
SIMPLENUM = /^[+-]?(?:\d(?:_?\d)*)+$/
|
||||
SIMPLE_STRING_OMIT = /\s*\n\s*/g
|
||||
LEADING_BLANK_LINE = /^[^\n\S]*\n/
|
||||
TRAILING_BLANK_LINE = /\n[^\n\S]*$/
|
||||
|
|
|
@ -21,6 +21,7 @@ test "Parser recognises binary numbers", ->
|
|||
test "call methods directly on numbers", ->
|
||||
eq 4, 4.valueOf()
|
||||
eq '11', 4.toString 3
|
||||
eq '1000', 1_000.toString()
|
||||
|
||||
eq -1, 3 -4
|
||||
|
||||
|
|
Loading…
Reference in New Issue