Skip to content

v0.4.0

Compare
Choose a tag to compare
@carocad carocad released this 19 Nov 22:24
· 214 commits to master since this release
3d33c54

BREAKING πŸ’€

Parcera now uses Antlr4 as its parsing engine instead of Instaparse. πŸš€

This drops the parsing time significantly. For comparison (on my machine) it took instaparse 3 seconds to parse clojure.core file (~8k loc), with antlr this drops to 100 milliseconds. Converting it to clojure persistent data structures adds some overhead but it is still way faster than instaparse in all cases that I tested.

Clojurescript support was dropped for the time being.

CHANGES

  • all - in keywords were changed to _ to allow compatibility with antlr4 allowed characters
    • :simple-keyword -> :simple_keyword
    • :macro-keyword -> :macro_keyword
    • :conditional-splicing -> :conditional_splicing
    • :namespaced-map -> :namespaced_map
    • :reader-macro -> :reader_macro
    • :metadata-entry -> :metadata_entry
    • :auto-resolve -> :auto_resolve
    • var-quote -> :var_quote
  • keywords now dont include the : or :: as part of their content and follow Clojure's name syntax
  • parcera/clojure function was renamed to parcera/ast for clarity on its purpose
    • ast returns a lazy sequence instead of the eager implementation from Instaparse
  • parcera now checks that maps, sets literals conform to Clojure syntax