Arc Forumnew | comments | leaders | submitlogin
ArcJS doesn't interpret escaped characters
2 points by lark 3604 days ago | 2 comments
Does anyone know how to make ArcJS interpret escaped characters?

Function whitec needs this, as part of arc.arc, and it's not provided by ArcJS. ArcJS can't escape #\space or #\newline defined by Racket.

From http://smihica.github.io/arc-js/

  ;; ArcJS 0.1.2
  arc> (def whitec (c)
         (in c #\space #\newline #\tab #\return))
  ;; passed -- read:0ms compile:111ms eval:1ms total:112ms
  #<fn:whitec>
  arc> (prn (whitec ("test" 0)))
  ;; passed -- read:0ms compile:4ms eval:0ms total:4ms
  Error: Unbound variable pace
  Stack Trace:
  _______________________________________
    0  fn 'whitec'
          EXECUTED (whitec #\t #\s)


3 points by rocketnia 3604 days ago | link

It should be supported now! https://github.com/smihica/arc-js/commit/7919d4654cc1ce9c701...

-----

1 point by akkartik 3604 days ago | link

As a guess you might need to use js char literals like ' ', '\n', etc. Can you try that?

-----