Skip to content
This repository has been archived by the owner on Aug 29, 2019. It is now read-only.
/ tag-soup Public archive

A library to parse code into descriptive maps

License

Notifications You must be signed in to change notification settings

oakes/tag-soup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note: This library is obsolete. You should use parinferish to parse Clojure code.

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.

About

A library to parse code into descriptive maps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published