Commit graph

163 commits

Author SHA1 Message Date
Paul Dorman
b460acf47a Hopefully improved the README. 2011-10-06 18:06:51 +13:00
Michał Marczyk
0374c221d9 Really fix handling of ::keywords using aliases
With this patch, Marginalia installs a custom keyword reader during
parsing.

This reader reuses clojure.lang.LispReader's readToken and matchSymbol
methods to read in either the whole keyword (when faced with a
single-colon keyword) or the part following the first colon (a
single-colon keyword, if we get to this case). Single-colon keywords
may have arbitrary namespace parts, so no aliasing issues arise.

The object returned depends on the type of keyword being read in:

* :foo, :foo/bar => just the keyword

* ::foo/bar => (DoubleColonKeyword. :foo/bar)

DCK's print-method writes out a single colon followed by the string
representation of the DCK's contents, for the genuine double-colon
keyword look.

Note that readToken and matchSymbol are private; this patch uses
clojure.contrib.reflect/call-method to call them.
2011-09-19 05:05:12 +02:00
Michał Marczyk
f7f63b1149 Reverting "Fix handling of ::keywords using aliases"
Evaluating ns forms which :use some symbols gets as in trouble unless
we also evaluate the relevant definitions in the other namespace. This
leads to the issue of loading the namespaces in the correct order etc.
So, if we want to be able to generate docs without compiling the whole
project, the "eval ns forms" approach is a no-go. :-(
2011-09-19 05:05:12 +02:00
Michał Marczyk
3fff515edb Fix handling of ::keywords using aliases
This patch introduces namespace tracking to Marginalia's parser: ns,
in-ns, require, use and alias forms are now evaluated in the proper
namespace at read-time. This is necessary to handle ::keywords in full
generality, since ::foo/bar is a valid token iff the symbol 'foo can
be resolved to a namespace at read time:

    (in-ns 'test)

    ::foo/bar
    ; => invalid token results in read-time error

    (require '[some.namespace :as foo])
    ::foo/bar
    ; => :some.namespace/foo

NB. only top-level #{ns in-ns require use alias} forms are recognized.
2011-09-14 20:19:49 +08:00
Fogus
142f09f75f Edited README.md via GitHub 2011-09-07 11:05:07 -03:00
fogus
191103e4eb Fixed null deps explosion 2011-09-07 08:52:14 -04:00
fogus
9850bed1ea Fixing merges 2011-09-07 08:46:34 -04:00
fogus
b54a0adb2d Moving to dog-food 0.7.0-SNAP 2011-09-07 08:44:27 -04:00
dm3
ce56099d96 Proper resource resolution in tests
When tests are run, `resources` folder is on the classpath.
2011-09-07 08:37:30 -04:00
dm3
eebf43fa83 Project testing macro properly registeres failures
Without a `deftest` assertions fail but are not registered by the test
runner which makes runners like `lein test` pass in the presence of
failures.
2011-09-07 08:37:30 -04:00
dm3
632cd45e21 Fixed link to toc generation 2011-09-07 08:37:30 -04:00
dm3
3e30d02444 Fixed documentation 2011-09-07 08:37:30 -04:00
dm3
28d386611c Default namespace sorting by name. 2011-09-07 08:37:30 -04:00
dm3
dfd435a3d4 Basic tests for uberdoc!/multidoc!
Introduced `with-project` macro which runs clojure.test assertions
against the context of a project defined in `test_projects` folder.
2011-09-07 08:37:30 -04:00
dm3
556b633bcf Generate content for $namespace.html and toc.html
`multidoc!` generates a `toc.html` file containing the toc (with links)
and project info, and a bunch of `$namespace.html` files (one for each
.clj file).
2011-09-07 08:37:30 -04:00
dm3
b76df81683 Multidoc (splitting docs into multiple pages).
Implemented basic test framework for working with source trees (similar
to what is done in http://github.com/technomancy/leiningen).
Basic functionality of writing separate source files to separate output
files.
2011-09-07 08:37:30 -04:00
fogus
0cec5a0cd1 Added mm problem case 2011-09-07 08:35:48 -04:00
fogus
bd8ce82b25 Merge branches 'master' and 'master' of github.com:fogus/marginalia 2011-09-07 08:34:56 -04:00
Fogus
7b011b059d Added Mr. Brandmeyer 2011-09-06 22:13:04 -03:00
Fogus
09be8386ea Merge pull request #56 from kotarak/feature/deleinization
Feature/deleinization
2011-09-06 18:09:55 -07:00
Meikel Brandmeyer
44389e8a31 Add command line switches for project.clj options 2011-09-06 22:27:53 +02:00
Meikel Brandmeyer
4df40cb0de Add split-deps helper 2011-09-06 22:26:50 +02:00
Meikel Brandmeyer
7640c4119c Add nil-check to dependencies-html 2011-09-06 21:35:21 +02:00
fogus
d4765d1392 Fixed parse error for prefixed keywords 2011-08-29 15:05:18 -04:00
fogus
f79407366e Fixed parse error for prefixed keywords 2011-08-29 15:04:12 -04:00
Fogus
6a0bd82549 Adding dm3 to README (contributors) 2011-08-10 09:35:54 -03:00
Fogus
77af441e3d Merge pull request #52 from dm3/master
Marginalia fails on clojure files containing strings or other literals outside of forms (top level).
2011-08-10 05:33:13 -07:00
dm3
c3b499f199 Proper resource resolution in tests
When tests are run, `resources` folder is on the classpath.
2011-08-10 20:30:04 +08:00
dm3
77173e8c59 Project testing macro properly registeres failures
Without a `deftest` assertions fail but are not registered by the test
runner which makes runners like `lein test` pass in the presence of
failures.
2011-08-10 20:29:54 +08:00
dm3
f26dc64716 Fixed link to toc generation 2011-08-10 20:29:43 +08:00
dm3
3fb8e71c09 Fixed documentation 2011-08-10 20:29:43 +08:00
dm3
315889b8c3 Default namespace sorting by name. 2011-08-10 20:29:43 +08:00
dm3
a5f2aeb19f Basic tests for uberdoc!/multidoc!
Introduced `with-project` macro which runs clojure.test assertions
against the context of a project defined in `test_projects` folder.
2011-08-10 20:29:42 +08:00
dm3
cb7a90ff93 Generate content for $namespace.html and toc.html
`multidoc!` generates a `toc.html` file containing the toc (with links)
and project info, and a bunch of `$namespace.html` files (one for each
.clj file).
2011-08-10 20:29:30 +08:00
dm3
5566664050 Multidoc (splitting docs into multiple pages).
Implemented basic test framework for working with source trees (similar
to what is done in http://github.com/technomancy/leiningen).
Basic functionality of writing separate source files to separate output
files.
2011-08-10 20:29:22 +08:00
dm3
1027d5bba3 Fixed errors happening when parser encountered string or number literals
outside of forms.

.gitignore: added temporary file generated by `lein test`
project.clj: dependency on vimclojure
test/parse_test.clj: tests for situations causing errors pre-patch
src/marginalia/parser.clj: literal handling during code block merges
2011-08-10 20:29:13 +08:00
dm3
9725f6d2cb Fixed errors happening when parser encountered string or number literals
outside of forms.

.gitignore: added temporary file generated by `lein test`
project.clj: dependency on vimclojure
test/parse_test.clj: tests for situations causing errors pre-patch
src/marginalia/parser.clj: literal handling during code block merges
2011-07-25 01:31:49 +03:00
Anthony Grimes
a45914efc8 Edited README.md via GitHub 2011-07-18 13:17:03 -07:00
Fogus
be370ac573 Edited README.md via GitHub 2011-07-16 07:35:05 -07:00
Fogus
23f51feaef Merge pull request #47 from hugoduncan/add-zi-to-readme
Add zi plugin documentation for running marginalia from maven
2011-07-16 07:33:37 -07:00
Hugo Duncan
0a644d80ec Update to zi 0.3.1 2011-07-16 00:12:29 -04:00
Hugo Duncan
1bd50cc461 Add zi plugin documentation for running marginalia from maven 2011-07-15 14:54:32 -04:00
Zachary Kim
7c3192e5ff Updated README, last time, promise. 2011-06-28 22:56:46 -07:00
Zachary Kim
5d4f7ab362 Updated README 2011-06-28 22:54:25 -07:00
Zachary Kim
38360c24d1 Updated README 2011-06-28 22:53:49 -07:00
Fogus
56dd312330 Merge pull request #44 from sritchie/master
Updated Cake instructions in README.
2011-06-28 18:57:25 -07:00
Sam Ritchie
d9fd66d1bc updated README for proper cake plugin info. 2011-06-28 16:37:44 -04:00
zkim
3341539007 Updated readme for version 0.6.0 2011-06-27 16:50:26 +00:00
zkim
f69ebbda12 Split done, bump to 0.6.0. See fogus/lein-marginalia and fogus/cake-marginalia. 2011-06-27 16:18:03 +00:00
zkim
add2c796b2 Removed leiningen plugin, moving to separate project. 2011-06-25 17:32:07 +00:00