Skip to content

Commit 21fee9b

Browse files
committed
Implement nqp::ordat.
1 parent d065d45 commit 21fee9b

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

TODO

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ We need to write tests (if they don't already exist in t/nqp)
2727
- nfafromstatelist
2828
- nfarunalt
2929
- nfarunproto
30-
- ordat - EASY
3130
- pop_i
3231
- push_i
3332
- push_s

src/vm/js/QAST/Compiler.nqp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ class QAST::OperationsJS {
415415
add_simple_op('flip', $T_STR, [$T_STR], sub ($string) {"$string.split('').reverse().join('')"});
416416

417417
add_simple_op('ord', $T_INT, [$T_STR, $T_INT], sub ($string, $pos='0') {"$string.charCodeAt($pos)"});
418+
%ops<ordat> := %ops<ord>;
418419

419420
add_simple_op('null', $T_OBJ, [], sub () {"null"});
420421
add_simple_op('isnull', $T_BOOL, [$T_OBJ], sub ($obj) {"($obj === null)"});

0 commit comments

Comments
 (0)