- Jan 30, 2013
-
-
Rene Saarsoo authored
The Format::Class is now much-much cleaner. To avoid passing the Relations object explicitly around, add an accessor to Format::Doc - so we can just pass an instance of the formatter around and TypeParser can get the relations object from the formatter, which it gets passed anyway and which already includes the relations.
-
Rene Saarsoo authored
Turn Shortener from singleton into normal class - simplifies testing, and in the context of Tag::Doc it only gets instantiated once anyway. Also rename :shortDoc to :short_doc - a more Rubysh name.
-
Rene Saarsoo authored
-
Rene Saarsoo authored
-
Rene Saarsoo authored
Cleaning up the top-level JsDuck namespace.
-
- Jan 29, 2013
-
-
Rene Saarsoo authored
The rendering of @cfg, @property, @css_var subproperties got lost during the previous refactorings. Add a special Subproperties tag class to render the :properties field.
-
Rene Saarsoo authored
Param, Return and Throw classes now perform calls to Subproperties.render* methods as needed. Additionally rename the Param tag @key from :param to :params. Otherwise we have no handler for the :params key to render the HTML.
-
Rene Saarsoo authored
Move the rendering of params, return and throws inside that.
-
Rene Saarsoo authored
Move the whole rendering of class sidebar inside that. The Renderer class is now way cleaner.
-
Rene Saarsoo authored
Instead of having three fixed places for positioning the docs, the Tag classes are now sorted based on a numeric #html_position value. For start I'm defining three constants, but any other values can also be used.
-
Rene Saarsoo authored
For now we're also introducing a special html_position=:doc. But the next step will be to get rid of that.
-
Rene Saarsoo authored
-
Rene Saarsoo authored
-
Rene Saarsoo authored
-
Rene Saarsoo authored
-
Rene Saarsoo authored
The HTML rendering is now done in two parts: 1. Tag#format method is called, passing the DocFormatter. This is where Markdown to HTML conversion happens. 2. Tag#to_html method is called, which must just return HTML. No more can formatter be used inside #to_html. This simplified the passing of DocFormatter instance to Tags - no more do we need to inject the formatter inside Tag classes, instead we can just pass it as a parameter. With this we remove the single remaining state object from Tag class.
-
- Jan 28, 2013
-
-
Rene Saarsoo authored
A minor enhancement to improve compatibility with Closure Compiler.
-
Rene Saarsoo authored
Eliminates a special case code used when calling the overrides processor. Added :[]= method to options to allow us setting values. Changed the implementetion to use idiomatic instance_variable_get/set methods.
-
Rene Saarsoo authored
Because :name applies to all members, introduce a special merge_context called :member, which expands to list of all known member types.
-
Rene Saarsoo authored
This allows us to do a larger refactoring in Merger class, eliminating all the merge_like_* methods, and doing almost all the merging inside the main #merge method.
-
Rene Saarsoo authored
Removing duplication of the docs and code comparison and merging code.
-
Rene Saarsoo authored
Introduce new Tag class just of this merging.
-
Rene Saarsoo authored
-
Rene Saarsoo authored
For now introduce the merge context of :method_like.
-
Rene Saarsoo authored
-
Rene Saarsoo authored
-
Rene Saarsoo authored
With bunch of refactoring in Merger class.
-
Rene Saarsoo authored
This way we can assure it always gets a default value of []. Which is convenient as we often need to loop through the alternate names, but checking the existance first is bordersome.
-
Rene Saarsoo authored
Having these default to nil is just fine. Only when merging two classes together, one needs to take the nils into account - so add some code for that.
-
Rene Saarsoo authored
Defaulting to nil is just fine.
-
Rene Saarsoo authored
-
Rene Saarsoo authored
-
Rene Saarsoo authored
-
Rene Saarsoo authored
-
Rene Saarsoo authored
Leftovers from old times.
-
Rene Saarsoo authored
The general #do_merge method seems to already cover that. Probably just a left over code from some ye old times.
-
Rene Saarsoo authored
@cfg, @property and @constructor can be followed by docs that are part of the top-level documentation. Instead of having the logic for that hard-coded to Doc::Processor class, the latter only extracts the general :doc, and the Tag classes themselves append top-level docs to this when needed.
-
Rene Saarsoo authored
I always intended \z, but mistakenly wrote \Z instead.
-
Rene Saarsoo authored
-
Rene Saarsoo authored
For some reason I had always thought \Z is the end of string in Ruby, but it turns out \z is actually the end of string while \Z will match right before a newline at the end of string if there happens to be one. This little difference caused quite an unexpected behavior in one corner case where the code example is on just a line before the @tag.
-