Skip to content
A library to parse code into descriptive maps
Clojure
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/tag_soup Revert "Move specs to separate ns" Aug 17, 2019
.gitignore
README.md Remove paragraph Aug 17, 2019
UNLICENSE Add copyright renunciation Mar 5, 2016
deps.edn Use :main-opts Aug 2, 2019
prod.clj Improve read-deps-edn fn Apr 3, 2019
project.clj Start 1.7.1-SNAPSHOT Aug 17, 2019
test.clj Make tests inline Apr 3, 2019

README.md

Clojars Project

Introduction

A Clojure and ClojureScript library that uses tools.reader to parse clojure code into maps that describe each token. The results come in one large map that organizes them by line number. Example use:

(code->tags "(+ 1 1)")
; => {1 [{:begin? true, :column 1, :value (+ [1] [1]), :indent 0, :top-level? true, :skip-indent? true} {:delimiter? true, :column 1} {:end? true, :column 2, :next-line-indent 3, :indent 3} {:begin? true, :column 2, :value +, :indent 3, :top-level? false} {:end? true, :column 3} {:begin? true, :column 4, :value 1, :indent 3, :top-level? false} {:end? true, :column 5} {:begin? true, :column 6, :value 1, :indent 5, :top-level? false} {:end? true, :column 7} {:delimiter? true, :column 7} {:end? true, :column 8, :next-line-indent 0} {:end? true, :column 8}]}

Usage

You can include this library in your project dependencies using the version number in the badge above.

Licensing

All files that originate from this project are dedicated to the public domain. I would love pull requests, and will assume that they are also dedicated to the public domain.

You can’t perform that action at this time.