kevinlawler / kona

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

Syntax error on display of text with colon just before new line #526

Closed tavmem closed 4 years ago

tavmem commented 6 years ago

Another relatively minor bug to document. The following script works fine

$ cat tst4.k
` 0: "this is the result\n"

$ rlwrap -n ./k
kona      \ for help. \\ to exit.

  \l tst4
this is the result

Adding a colon to the text (just before the \n) results in a syntax error

$ cat tst5.k
` 0: "this is the result:\n"

$ rlwrap -n ./k
kona      \ for help. \\ to exit.

  \l tst5
syntax error
> 

Adding a space resolves the error

$ cat tst6.k
` 0: "this is the result: \n"

$ rlwrap -n ./k
kona      \ for help. \\ to exit.

  \l tst6
this is the result:
tavmem commented 4 years ago
$ rlwrap -n ./k
kona      \ for help. \\ to exit.

  \l tst4
this is the result
  \l tst5
this is the result:
  \l tst6
this is the result: