Skip to content

How to support other Lisp dialects #209

@shaunlebron

Description

@shaunlebron

Parinfer is a lazy, partial reader— allowing it the opportunity to ignore most irrelevant differences between dialects, but it needs to support more specific dialect features

Parinfer assumes Clojure-like syntax— blowing past characters presumed to have no effect on parens and indentation. This allows some flexibility with other dialects, but eventually causes problems with other language features below:

See issues:

Some dialects we look at:

  • Racket
  • Hy
  • Common Lisp
  • Janet
  • Pico Lisp
  • Scheme
  • Fennel (should be identical to clj syntax)

Here-strings

strings delimited by custom phrases

Multi-line strings

Nestable block comments

may be nested, unlike in C /*.../*...*/...*/)

Bracket types

  • Common Lisp: only ( ) are significant— allowing unbalanced { [ in symbols doc-cl-bracket

Comment lines

Comment forms

A preceding # can re-interpret the usual ; comment as commenting the next form instead of to the end of line:

Literal symbols

pipes |...| allow special characters inside symbols. Sometimes \| is allowed inside (CL, not Racket):

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions