瀏覽代碼

Test user-defined AST nodes.

master
Ian Piumarta 1 年之前
父節點
當前提交
5b1ec1d738
共有 1 個檔案被更改,包括 3 行新增1 行删除
  1. +3
    -1
      test.ref

+ 3
- 1
test.ref 查看文件

@ -185,13 +185,15 @@ MACRO EVAL test with three and four
call testfun call testfun
REPLACEMENT 1 REPLACEMENT 1
REPLACEMENT three REPLACEMENT three
MakeSeven.__eval__ invoked
AST eval => 42
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
10 9 8 7 6 5 4 3 2 1 0 10 9 8 7 6 5 4 3 2 1 0
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
65 66 67 68 69 65 66 67 68 69
1 two 3 four 1 two 3 four
test.txt:331: *: illegal operand types Integer and String
test.txt:346: *: illegal operand types Integer and String
11: n * factorial(n - 1) 11: n * factorial(n - 1)
10: if (n < 2) "1" else n * factorial(n - 1) 10: if (n < 2) "1" else n * factorial(n - 1)
9: factorial(n - 1) 9: factorial(n - 1)

Loading…
取消
儲存