Support clojure-dart
jgoday opened this issue · 3 comments
jgoday commented
Support clojure-dart source files.
Currently, clojure-dart files are basically clojure source files that compiles to dart.
See:
- https://github.com/Tensegritics/ClojureDart
- https://github.com/Tensegritics/ClojureDart/blob/816344d4abaf5165fe55ebf3af662af7d3ab3ca8/doc/differences.md
Expected behavior
Clojure-mode should support clojure-dart files (.cljd).
Actual behavior
Current clojure-mode does not detect .cljd files.
Steps to reproduce the problem
Environment & Version information
clojure-mode version
clojure-mode (version 5.14.0)
Emacs version
28.0.91
Operating system
MacOS 12.0.1
bbatsov commented
Are there any syntax differences between Clojure and ClojureDart?
jgoday commented
Are there any syntax differences between Clojure and ClojureDart?
As pointed here: https://github.com/Tensegritics/ClojureDart/blob/main/doc/differences.md
there are some minor/very subtle differences (taken directly from clojureDart documentation)
- Exceptions: Try/catch with additional stacktrace alongside with the exception
(try
...
(catch io/HttpException e ; no stack trace binding
...)
(catch Exception e st ; stack trace binding
...))- Member names as strings
(. a "[]=" i v)- Dart literals
#dart [1 2 3] ; a growable List<dynamic>
#dart ^:fixed [1 2 3] ; a fixed List<dynamic>
#dart ^int [1 2 3] ; a growable List<int>
#dart ^:fixed ^int [1 2 3] ; a fixed List<int>- Reify with extends
(reify
:extends material/StatelesWidget
(build [_ ctx] ...))vemv commented
Released as clojure-mode 5.15.0, which will be available within a couple hours