vickychijwani / closer.js

:hammer_and_wrench: Clojure parser and core library in JavaScript, compatible with the Mozilla Parser API.
https://vickychijwani.github.io/closer.js
MIT License
82 stars 8 forks source link

Add support for namespaces #1

Open omphalos opened 10 years ago

omphalos commented 10 years ago

Not that familiar with ClojureScript so sorry if this is off-base, but it's my understanding the the following should work:

require('closer').parse("(ns a.b)")

This works okay when I try the ClojureScript webservice REPL at Himera: http://himera.herokuapp.com/index.html

Closer seems unhappy about the dot inside "a.b".

vickychijwani commented 10 years ago

Closer doesn't understand the concept of namespaces yet, because it wasn't needed on CodeCombat. The only legal position for a dot character is at the beginning -- (.property object) -- or at the end of the first token, -- (constructor. params) -- both used for JavaScript inter-op.

By the way you're welcome to take a crack at implementing namespaces ;)