emkay / nesly

A programming language that compiles down to 6502 NES assembler
78 stars 13 forks source link

Read args not arguments! #13

Closed emkay closed 9 years ago

emkay commented 10 years ago

The issue here is that I need to add support for passing in args to functions. Right now it's a huge hack by using arguments. I've got object passing working, but basic arguments do not. This is why the joy.js test fails.

nesly@0.1.0 test /Users/matuzak/workspace/nesly tap tests/*.js

not ok tests/joy.js ..................................... 1/2 Command: "node" "joy.js" TAP version 13 not ok 1 TypeError: string is not a function

    type:    TypeError
    message: string is not a function
    code:    called_non_callable
    errno:   ~
    file:    /Users/matuzak/workspace/nesly/lib/joy.js
    line:    23
    column:  21
    stack:
      - Object.read (/Users/matuzak/workspace/nesly/lib/joy.js:23:21)
      - Test.<anonymous> (/Users/matuzak/workspace/nesly/tests/joy.js:7:25)
      - Test.EventEmitter.emit (events.js:117:20)
      - Test.emit (/Users/matuzak/workspace/nesly/node_modules/tap/lib/tap-test.js:104:8)
      - GlobalHarness.Harness.process (/Users/matuzak/workspace/nesly/node_modules/tap/lib/tap-harness.js:87:13)
      - process._tickCallback (node.js:415:13)
      - Function.Module.runMain (module.js:499:11)
      - startup (node.js:119:16)
      - node.js:901:3
    thrown:  true
  ...
ok 2 tests/joy.js
1..2
# tests 2
# pass  1
# fail  1

ok tests/sprites.js ..................................... 2/2 total ................................................... 3/4

not ok npm ERR! weird error 1 npm ERR! not ok code 0

emkay commented 10 years ago

Not closing this, but not going to block right now.