eraserhd / parinfer-rust

A Rust port of parinfer.
ISC License
546 stars 42 forks source link

In kakoune, Janet `;` is treated as comment #143

Closed iacore closed 1 year ago

iacore commented 1 year ago

In janet, ;(...) is (splice (...)). I think parinfer treats it as comment instead.

I checked the file parinfer.kak, but that seems to work fine. cc @andreyorst

Reproduction

Save the code bellow as foo.janet. In kak, set buffer filetype janet. Try to replace (splice parsed) with ;parsed. You will see that the line turns into (tuple) ;parsed

(defn process-range [s]
  (def parsed (map |(scan-number $ 16) (string/split "-" s)))
  (if (= 1 (length parsed))
      (parsed 0)
      (tuple (splice parsed))))
andreyorst commented 1 year ago

@andreyorst can you help me on this?

Sorry, haven't used Kakoune in a year, and never used janet because of its syntax.