Skip to content

Commit

Permalink
postfix ala and test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dmadisetti committed Sep 16, 2021
1 parent 43865c3 commit 84bd3ad
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ ijo NanpaTenpo li NanpaKiwen weka NanpaKo
ijo NanpaTenpo li NanpaTenpo mute NanpaKo
# nanpa li ala kiwen. nanpa li ko
ken NanpaTenpo li NanpaKiwen la tawa Kiwen
# ken nanpa tenpo li suli
ijo NanpaTenpo li NanpaTenpo weka NanpaKiwen
ken NanpaTenpo li 1 la tawa Kiwen
# nanpa li ken kiwen
tawa Ko
Expand Down Expand Up @@ -65,7 +62,7 @@ why not

#### expressions

`ala` `[symbol]`: not symbol
`A` `ala`: not A

`A` `anu` `B`: bitwise or

Expand Down
4 changes: 2 additions & 2 deletions sona.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
(X)=>w(X)||E(X),P=(n,f)=>((...A)=>(A.length==
n||R(...A))&&f(A[0])), p=(f)=>P(1, f),s=(s)=>(s
).split(/\s+/),f=(a)=>w(a)?v[a]:(a|0),u=(...A)=>(
a=A.length)>3?Q(A):[f,(op,a)=>(o[op]||R(op))(f(a)),
(a,op, b)=>(i[op] ||R(op))(f(a),f(b))|0,][a-1](...A),
a=A.length)>3?Q(A):[f,(a,op)=>(o[op]||R(op))(f(a)),
(a,op,b)=>(i[op]||R(op))(f(a),f(b))|0,][a-1](...A)|0,
U=(p)=>(I[r=p.shift()]||R(r))(...p),n=( )=>s(c[l++])
;const o={ "ala":(a)=>!a};const i ={"anu":(a,b
)=> (a| b), "en": (a, b) => a+b, "mute":(a, b
Expand Down
5 changes: 4 additions & 1 deletion test/nanpa.sona
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,7 @@ ijo Wan li TuTu li 4

ijo Ala li NanpaIke weka 0

nanpa TuTu TuTuTu MuteEnLuka MuteEnLukaWan NanpaWeka 42 NanpaAnu Wan Ala 1337
# 1
ijo WanSin li Ala ala

nanpa TuTu TuTuTu MuteEnLuka MuteEnLukaWan NanpaWeka NanpaIke NanpaAnu Wan WanSin Ala 1337
3 changes: 0 additions & 3 deletions test/nanpakiwen.sona
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ ijo NanpaTenpo li NanpaKiwen weka NanpaKo
ijo NanpaTenpo li NanpaTenpo mute NanpaKo
# nanpa li ala kiwen. nanpa li ko
ken NanpaTenpo li NanpaKiwen la tawa Kiwen
# ken nanpa tenpo li suli
ijo NanpaTenpo li NanpaTenpo weka NanpaKiwen
ken NanpaTenpo li 1 la tawa Kiwen

# nanpa li ken kiwen
tawa Ko
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('sona', function() {
describe('nanpa', function() {
it('basic number operations', function(done) {
load_sona("nanpa.sona",
(result) => assert.deepEqual(result, [4, 8, 15, 16, 23, 42, 12, 1, 0, 1337]), done);
(result) => assert.deepEqual(result, [4, 8, 15, 16, 23, 42, 12, 1, 1, 0, 1337]), done);
});
});
describe('primes', function() {
Expand Down

0 comments on commit 84bd3ad

Please sign in to comment.