Error formatting macro: pagetree: java.lang.NullPointerException

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


The Clojure and ClojureScript readers do not currently track the column number when reading forms, only line numbers.

((juxt :line :column) (meta #'identity)) => [1351 nil]

Several components could be improved by tracking column information:

  • Compiler error messages
  • Tooling, such as SLIME or IDEs (consider jump-to-definition)

However, the key motivator is Source Maps for ClojureScript. The development tools in modern browsers have growing support for graphical debugging of machine generated code. This is relevant for minified JavaScript, but it's also intended for use with multi-stage transformations, such as CoffeeScript/GWT/ClojureScript -> Unoptimized Javascript -> Google Closure Compiler -> Final JavaScript


Patches Clojure's LispReader and other components of the compiler:

ClojureScript's reader will need a similar patch, but that's not required to enable SourceMaps.