kevinlawler / kona

Open-source implementation of the K programming language
ISC License
1.36k stars 138 forks source link

Nested resumes #570

Closed bakul closed 4 years ago

bakul commented 4 years ago

k3 handles nested resume properly:

  +\1 + 4#3+"a"
type error
+\1 + 4#3+"a"
         ^
>  +\1 + 4#3+"a"
type error
+\1 + 4#3+"a"
         ^
>>   : 7 + 3
11 22 33 44
>  : 2+3
6 12 18 24

Not so kona:

  +\1 + 4#3+"a"
type error
+\1 + 4#3+"a"
at execution instance 1 of "+"
>  +\1 + 4#3+"a"
>  : 7 + 3
11 22 33 44
  : 2+3
5
tavmem commented 4 years ago

After commit noted above

kona      \ for help. \\ to exit.

  +\1 + 4#3+"a"
type error
+\1 + 4#3+"a"
at execution instance 1 of "+"
>  +\1 + 4#3+"a"
type error
+\1 + 4#3+"a"
at execution instance 1 of "+"
>>  : 7 + 3
11 22 33 44
>  : 2+3
6 12 18 24