mirror of
https://github.com/ilyakooo0/luau.git
synced 2024-10-03 21:48:26 +03:00
Added hex ints
This commit is contained in:
parent
019aeb2d86
commit
c0191b63dd
@ -2,3 +2,4 @@
|
|||||||
|
|
||||||
- [ ] functioncall
|
- [ ] functioncall
|
||||||
- [ ] any string apart from the basic string with no escapes
|
- [ ] any string apart from the basic string with no escapes
|
||||||
|
- [ ] check if int fits in int or make it a float
|
||||||
|
@ -310,7 +310,7 @@
|
|||||||
::
|
::
|
||||||
+$ numeral
|
+$ numeral
|
||||||
$%
|
$%
|
||||||
[%int @s]
|
[%int @u]
|
||||||
:: [%float @rd]
|
:: [%float @rd]
|
||||||
==
|
==
|
||||||
++ parse-numeral
|
++ parse-numeral
|
||||||
@ -318,10 +318,14 @@
|
|||||||
|.
|
|.
|
||||||
;~ pose
|
;~ pose
|
||||||
%+ cook
|
%+ cook
|
||||||
|= [is-neg=(unit *) x=@]
|
|= x=@u [%int x]
|
||||||
[%int (new:si ?=(~ is-neg) x)]
|
;~ pose
|
||||||
;~ plug
|
;~ pfix
|
||||||
(punt (just '-'))
|
(just '0')
|
||||||
|
(mask "xX")
|
||||||
|
hex
|
||||||
|
==
|
||||||
|
::
|
||||||
(bass 10 (plus dit))
|
(bass 10 (plus dit))
|
||||||
==
|
==
|
||||||
==
|
==
|
||||||
@ -329,7 +333,7 @@
|
|||||||
|= [num=numeral]
|
|= [num=numeral]
|
||||||
^- tape
|
^- tape
|
||||||
?- -.num
|
?- -.num
|
||||||
%int (show-s +.num)
|
%int (show-u +.num)
|
||||||
==
|
==
|
||||||
:: exprlist
|
:: exprlist
|
||||||
::
|
::
|
||||||
@ -524,6 +528,8 @@
|
|||||||
;~(plug name-fst-char (star name-char))
|
;~(plug name-fst-char (star name-char))
|
||||||
++ show-s
|
++ show-s
|
||||||
|=(s=@s `tape`[?:((syn:si s) %$ '-') (slag 2 (scow %ui (abs:si s)))])
|
|=(s=@s `tape`[?:((syn:si s) %$ '-') (slag 2 (scow %ui (abs:si s)))])
|
||||||
|
++ show-u
|
||||||
|
|=(u=@u `tape`(slag 2 (scow %ui u)))
|
||||||
++ bind
|
++ bind
|
||||||
|* =mold
|
|* =mold
|
||||||
|* [prev=rule cont=$-(mold rule)]
|
|* [prev=rule cont=$-(mold rule)]
|
||||||
|
Loading…
Reference in New Issue
Block a user