]> git.wincent.com - docvim.git/log
docvim.git
6 years agoFix gitignore
Greg Hurrell [Sun, 12 Jun 2016 22:00:17 +0000 (15:00 -0700)] 
Fix gitignore

To actually ignore the files I (don't) care about.

6 years agoAttempt workaround for cyclic update issue
Greg Hurrell [Sun, 12 Jun 2016 21:59:11 +0000 (14:59 -0700)] 
Attempt workaround for cyclic update issue

On the one hand, I like the simplicity of keeping all
the files in the input dirs (and also the fact that it
exercises the logic that targets only .vim files), but
I don't want to deal with cyclic updates, so let's just
pretend these files don't exist.

6 years agoAdd vim-docvim to integration tests
Greg Hurrell [Sun, 12 Jun 2016 21:48:26 +0000 (14:48 -0700)] 
Add vim-docvim to integration tests

6 years agoUpdate integration test files
Greg Hurrell [Sun, 12 Jun 2016 21:47:14 +0000 (14:47 -0700)] 
Update integration test files

Evidently, we have a circular dependency here. You update the
input files, get new output, copy the output over to the
other repo, commit it there, and now your input files have
changed. Not too worried about this, but it would be nice to
find a neat way to avoid the issue.

6 years agoGet changelog ready for master development
Greg Hurrell [Sun, 12 Jun 2016 07:56:30 +0000 (00:56 -0700)] 
Get changelog ready for master development

6 years agoAdd missing changelog updates
Greg Hurrell [Sun, 12 Jun 2016 07:55:51 +0000 (00:55 -0700)] 
Add missing changelog updates

6 years agoPrepare for 0.3.1.0 release 0.3.1.0
Greg Hurrell [Sun, 12 Jun 2016 07:52:31 +0000 (00:52 -0700)] 
Prepare for 0.3.1.0 release

6 years agoSquelch warning
Greg Hurrell [Sun, 12 Jun 2016 07:48:30 +0000 (00:48 -0700)] 
Squelch warning

> Exposed modules use unallocated top-level names: Paths_docvim

Closes: https://github.com/wincent/docvim/issues/13
6 years agoGet back -Werror, at least when running via Stack
Greg Hurrell [Sun, 12 Jun 2016 07:29:52 +0000 (00:29 -0700)] 
Get back -Werror, at least when running via Stack

This seems the easiest way to get the behavior I desire, seeing as I only ever
run stuff via Stack, but this won't block package uploads to Hackage.

6 years agoStart new changelog section
Greg Hurrell [Sun, 12 Jun 2016 07:22:30 +0000 (00:22 -0700)] 
Start new changelog section

6 years agoDon't use Werror 0.3.0.0
Greg Hurrell [Sun, 12 Jun 2016 07:18:25 +0000 (00:18 -0700)] 
Don't use Werror

Otherwise, I can't upload a package:

> Invalid package
>
> 'ghc-options: -Wall -Werror' makes the package very easy to break with future
> GHC versions because new GHC versions often add new warnings. Use just
> 'ghc-options: -Wall' instead. Alternatively, if you want to use this, make it
> conditional based on a Cabal configuration flag (with 'manual: True' and
> 'default: False') and enable that flag during development.

6 years agoUpdate CHANGELOG prior to 0.3.0.0 release
Greg Hurrell [Sun, 12 Jun 2016 06:59:25 +0000 (23:59 -0700)] 
Update CHANGELOG prior to 0.3.0.0 release

6 years agoAdd bin/get and bin/put for updating integration tests and downstreams
Greg Hurrell [Sun, 12 Jun 2016 06:50:47 +0000 (23:50 -0700)] 
Add bin/get and bin/put for updating integration tests and downstreams

6 years agoRemove useless script
Greg Hurrell [Sun, 12 Jun 2016 06:07:17 +0000 (23:07 -0700)] 
Remove useless script

Those tests don't exist any more, so no need to update them.

6 years agoFix explicit links to GitHub headings
Greg Hurrell [Sun, 12 Jun 2016 06:03:22 +0000 (23:03 -0700)] 
Fix explicit links to GitHub headings

Not sure whether I want to apply this to h3 or just h1/h2, but for now doing it
to all headings.

Closes: https://github.com/wincent/docvim/issues/3
6 years agoGet rid of ugly ast, ast2, ast3 etc bindings
Greg Hurrell [Sun, 12 Jun 2016 05:01:40 +0000 (22:01 -0700)] 
Get rid of ugly ast, ast2, ast3 etc bindings

The replacement is pretty ugly too, so will look at refactoring further.

Closes: https://github.com/wincent/docvim/issues/11
6 years agoFix indent
Greg Hurrell [Sat, 11 Jun 2016 07:10:01 +0000 (00:10 -0700)] 
Fix indent

6 years agoRemove redundant integration tests
Greg Hurrell [Sat, 11 Jun 2016 07:01:35 +0000 (00:01 -0700)] 
Remove redundant integration tests

This and more now covered by tests/fixtures/integration.

Closes: https://github.com/wincent/docvim/issues/10
6 years agoAdd parser tests to integration tests
Greg Hurrell [Sat, 11 Jun 2016 06:59:47 +0000 (23:59 -0700)] 
Add parser tests to integration tests

6 years agoUpdate changelog
Greg Hurrell [Sat, 11 Jun 2016 06:57:35 +0000 (23:57 -0700)] 
Update changelog

Want to get into the habit of doing this early and often.

6 years agoFilter out Empty nodes
Greg Hurrell [Sat, 11 Jun 2016 06:51:21 +0000 (23:51 -0700)] 
Filter out Empty nodes

I wanted (want) to do this in a more generic way, but I first figured I would do
this "manually" using pattern matching and explicit constructors. Will keep
looking thought to see if there is something in `Control.Lens` or `Data.Data`
that would help me do this.

Closes: https://github.com/wincent/docvim/issues/9
6 years agoAdd file meant to be included in previous commit
Greg Hurrell [Sat, 11 Jun 2016 06:28:47 +0000 (23:28 -0700)] 
Add file meant to be included in previous commit

6 years agoPartial implementation of pruning empty paths
Greg Hurrell [Sat, 11 Jun 2016 06:03:56 +0000 (23:03 -0700)] 
Partial implementation of pruning empty paths

Partly addresses: https://github.com/wincent/docvim/issues/9

6 years agoFix jumbled sections
Greg Hurrell [Sat, 11 Jun 2016 05:22:11 +0000 (22:22 -0700)] 
Fix jumbled sections

Injected headings were not getting correctly extracted because they didn't
appear inside `DocBlock`s.

Closes: https://github.com/wincent/docvim/issues/8
6 years agoFix style by camel-casing
Greg Hurrell [Sat, 11 Jun 2016 05:09:48 +0000 (22:09 -0700)] 
Fix style by camel-casing

6 years agoFix case for Vim help plugin header
Greg Hurrell [Sat, 11 Jun 2016 02:29:24 +0000 (19:29 -0700)] 
Fix case for Vim help plugin header

Always lower. And no need to be in the symbol table because the Vim printer
doesn't even consult it.

6 years agoCenter plugin header
Greg Hurrell [Sat, 11 Jun 2016 02:18:56 +0000 (19:18 -0700)] 
Center plugin header

Or "justify", if you prefer.

6 years agoDRY
Greg Hurrell [Sat, 11 Jun 2016 01:37:45 +0000 (18:37 -0700)] 
DRY

6 years agoDRY up the integration tests
Greg Hurrell [Fri, 10 Jun 2016 16:30:36 +0000 (09:30 -0700)] 
DRY up the integration tests

6 years agoAdd Vim help integration tests
Greg Hurrell [Fri, 10 Jun 2016 16:27:06 +0000 (09:27 -0700)] 
Add Vim help integration tests

With the magic of copy-pasta. Will refactor away the duplication presently.

6 years agoIndentation
Greg Hurrell [Fri, 10 Jun 2016 16:20:11 +0000 (09:20 -0700)] 
Indentation

6 years agoAdd (Markdown) integration tests
Greg Hurrell [Fri, 10 Jun 2016 16:12:54 +0000 (09:12 -0700)] 
Add (Markdown) integration tests

Plaintext to follow. Just need to figure out a way to do it cleanly.

6 years agoAdd integration test files
Greg Hurrell [Fri, 10 Jun 2016 15:29:05 +0000 (08:29 -0700)] 
Add integration test files

Copied into place with:

git --git-dir ~/code/ferret/.git archive --prefix=ferret/input/ master | tar -x -C tests/fixtures/integration -f -
git --git-dir ~/code/scalpel/.git archive --prefix=scalpel/input/ master | tar -x -C tests/fixtures/integration -f -

Will add more of these, I guess, as I start using docvim in more places.

6 years agoMore misguided refactoring
Greg Hurrell [Fri, 10 Jun 2016 14:46:13 +0000 (07:46 -0700)] 
More misguided refactoring

6 years agoStart refactoring golden tests to support end-to-end testing
Greg Hurrell [Fri, 10 Jun 2016 14:26:21 +0000 (07:26 -0700)] 
Start refactoring golden tests to support end-to-end testing

6 years agoShow compiled AST when debug flag is set
Greg Hurrell [Fri, 10 Jun 2016 07:15:18 +0000 (00:15 -0700)] 
Show compiled AST when debug flag is set

6 years agoRemove a stale comment
Greg Hurrell [Fri, 10 Jun 2016 06:43:12 +0000 (23:43 -0700)] 
Remove a stale comment

6 years agoFix remaining lint about duplication
Greg Hurrell [Fri, 10 Jun 2016 06:42:22 +0000 (23:42 -0700)] 
Fix remaining lint about duplication

First lint-free status in months. Yay.

6 years agoMake linter happier about duplication
Greg Hurrell [Fri, 10 Jun 2016 06:40:03 +0000 (23:40 -0700)] 
Make linter happier about duplication

Still not entirely happy.

6 years agoAdd bin/clean script
Greg Hurrell [Fri, 10 Jun 2016 06:06:33 +0000 (23:06 -0700)] 
Add bin/clean script

6 years agoAdd bin/build script and use it
Greg Hurrell [Fri, 10 Jun 2016 06:06:20 +0000 (23:06 -0700)] 
Add bin/build script and use it

6 years agoFix remaining warnings
Greg Hurrell [Fri, 10 Jun 2016 05:56:21 +0000 (22:56 -0700)] 
Fix remaining warnings

Which means we can turn -Werror back on.

Made sure to get a full rebuild with:

```
rm -rf .stack-work/dist/*
bin/build # really just `stack build --file-watch`
bin/lint
bin/test
```

6 years agoFurther improve type annotations
Greg Hurrell [Fri, 10 Jun 2016 05:40:23 +0000 (22:40 -0700)] 
Further improve type annotations

6 years agoImprove Parse.hs type signatures
Greg Hurrell [Fri, 10 Jun 2016 05:24:50 +0000 (22:24 -0700)] 
Improve Parse.hs type signatures

With the help of:

http://stackoverflow.com/questions/37739029/understanding-parsec-type-annotations

Now warning-free.

6 years agoFix a bunch of warnings from -W -Wall
Greg Hurrell [Fri, 10 Jun 2016 04:30:16 +0000 (21:30 -0700)] 
Fix a bunch of warnings from -W -Wall

In many ways, this makes the code uglier, but have to get worse in order to get
better, I think. Will keep ploughing on.

6 years agoBack out -Werror
Greg Hurrell [Fri, 10 Jun 2016 01:11:48 +0000 (18:11 -0700)] 
Back out -Werror

Not ready for it yet after all, still plenty to do.

6 years agoRemove some over-zealous indentation
Greg Hurrell [Fri, 10 Jun 2016 01:02:18 +0000 (18:02 -0700)] 
Remove some over-zealous indentation

6 years agoTurn on -Wall -Werror -W
Greg Hurrell [Fri, 10 Jun 2016 01:02:18 +0000 (18:02 -0700)] 
Turn on -Wall -Werror -W

I think we're clean even with all these turned on. Great. Want this now that we
are not being explicit about imports.

Some tweaks needed to keep the tests clean. Notably, to deal with:

    Defaulting the following constraint(s) to type ‘Integer’
      (Eq a0) arising from a use of ‘@=?’ at tests/Tasty.hs:35:7-9
      (Num a0) arising from the literal ‘7’ at tests/Tasty.hs:35:5
      (Show a0) arising from a use of ‘@=?’ at tests/Tasty.hs:35:7-9
      (Num a0) arising from a use of ‘walk’ at tests/Tasty.hs:48:30-33

Need to opt out of `-fwarn-type-defaults` in Tasty.hs.

6 years agoCut back on explicit imports as per the GHC style guide
Greg Hurrell [Fri, 10 Jun 2016 01:00:39 +0000 (18:00 -0700)] 
Cut back on explicit imports as per the GHC style guide

Quoting:

> Do not use explicit import lists, except to resolve name clashes. There are several reasons for this:
>
> - They slow down development: almost every change is accompanied by an import
>   list change.
> - They cause spurious conflicts between developers.
> - They lead to useless warnings about unused imports, and time wasted trying
>   to keep the import declarations "minimal".
> - GHC's warnings are useful for detecting unnecessary imports: see
>   `-fwarn-unused-imports`.
> - TAGS is a good way to find out where an identifier is defined (use `make tags`
>   in `ghc/compiler`, and hit `M-.` in emacs).

https://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle

Fair enough then!

6 years agoSilence build complaints about tasty other-modules being messing
Greg Hurrell [Fri, 10 Jun 2016 01:00:39 +0000 (18:00 -0700)] 
Silence build complaints about tasty other-modules being messing

Specifically:

```
Warning: modules not listed in docvim.cabal for 'tasty' component (add to
other-modules):
```

6 years agoMove under Text.* namespace
Greg Hurrell [Thu, 9 Jun 2016 15:36:56 +0000 (08:36 -0700)] 
Move under Text.* namespace

Closes: https://github.com/wincent/docvim/issues/7
6 years agodoc: add CHANGELOG.md
Greg Hurrell [Thu, 9 Jun 2016 15:23:40 +0000 (08:23 -0700)] 
doc: add CHANGELOG.md

6 years agodoc: update README
Greg Hurrell [Thu, 9 Jun 2016 15:23:26 +0000 (08:23 -0700)] 
doc: update README

- Note new annotations.
- Add notes on release process.
- Add links section.
- Add installation section.

6 years agoPrepare for 0.0.0.2 release 0.2.0.0
Greg Hurrell [Thu, 9 Jun 2016 15:06:16 +0000 (08:06 -0700)] 
Prepare for 0.0.0.2 release

Previous release doesn't seem to be available for download, possibly due to a
mismatch in the version numbers/tags.

6 years agoFix ordering within links in TOC 0.1.0.0
Greg Hurrell [Thu, 9 Jun 2016 14:25:25 +0000 (07:25 -0700)] 
Fix ordering within links in TOC

6 years agoDon't hardwrap inside fenced codeblocks
Greg Hurrell [Thu, 9 Jun 2016 14:22:21 +0000 (07:22 -0700)] 
Don't hardwrap inside fenced codeblocks

6 years agoAdd source-repository info to docvim.cabal
Greg Hurrell [Thu, 9 Jun 2016 14:17:27 +0000 (07:17 -0700)] 
Add source-repository info to docvim.cabal

As recommended by `cabal check`.

6 years agoTry to make `toc` more readable
Greg Hurrell [Thu, 9 Jun 2016 14:11:59 +0000 (07:11 -0700)] 
Try to make `toc` more readable

Instead of threading the `suffix` through multiple layers of function calls,
create a new scope with an inner function `toc'` that we can use to have
implicit access to it instead.

I think this might be more readable, although it is still somewhat of a hot
mess.

6 years agoPrint TOC in Vim output
Greg Hurrell [Thu, 9 Jun 2016 07:52:03 +0000 (00:52 -0700)] 
Print TOC in Vim output

6 years agoMake sure generated headings appear in TOC node
Greg Hurrell [Thu, 9 Jun 2016 05:03:43 +0000 (22:03 -0700)] 
Make sure generated headings appear in TOC node

6 years agoMostly-working TOC generation for AST
Greg Hurrell [Thu, 9 Jun 2016 02:52:52 +0000 (19:52 -0700)] 
Mostly-working TOC generation for AST

Not used in printers yet, and also note that because the printers may generate
headings of their own, we are missing generated headings.

6 years agoRemove unused type declaration
Greg Hurrell [Wed, 8 Jun 2016 17:49:54 +0000 (10:49 -0700)] 
Remove unused type declaration

6 years agoUse function application operator as reducer
Greg Hurrell [Wed, 8 Jun 2016 14:22:21 +0000 (07:22 -0700)] 
Use function application operator as reducer

I like this.

6 years agoImprove ordering in the compiler
Greg Hurrell [Wed, 8 Jun 2016 14:10:51 +0000 (07:10 -0700)] 
Improve ordering in the compiler

Make the footer go at the end. Not that the order matters, this just looks
better. (And speaking of the ordering not matter, that makes me wonder if there
is something Applicative I could to here... Probably not. Also thinking of using
a State monad or even just a simple fold to get rid of those intermediate
bindings.)

6 years agoFix options parsing when no default value is provided
Greg Hurrell [Wed, 8 Jun 2016 07:40:28 +0000 (00:40 -0700)] 
Fix options parsing when no default value is provided

6 years agoPrefer named imports
Greg Hurrell [Wed, 8 Jun 2016 06:27:26 +0000 (23:27 -0700)] 
Prefer named imports

6 years agoInject other kinds of headings
Greg Hurrell [Wed, 8 Jun 2016 06:25:06 +0000 (23:25 -0700)] 
Inject other kinds of headings

Mostly seems to work? Other than some suspicious empty
headings in some golden files.

6 years agoDRY up injection
Greg Hurrell [Wed, 8 Jun 2016 06:15:31 +0000 (23:15 -0700)] 
DRY up injection

6 years agoAuto-inject @commands annotation when necessary
Greg Hurrell [Wed, 8 Jun 2016 06:11:33 +0000 (23:11 -0700)] 
Auto-inject @commands annotation when necessary

6 years agoFix lints
Greg Hurrell [Wed, 8 Jun 2016 06:10:35 +0000 (23:10 -0700)] 
Fix lints

6 years agoMore elegant solution for state passthrough
Greg Hurrell [Wed, 8 Jun 2016 02:07:23 +0000 (19:07 -0700)] 
More elegant solution for state passthrough

6 years agoAvoid unwanted intermediate list in `cosmosOf uniplate`
Greg Hurrell [Wed, 8 Jun 2016 01:41:34 +0000 (18:41 -0700)] 
Avoid unwanted intermediate list in `cosmosOf uniplate`

Who knows: perhaps Haskell's magical laziness would have made these equivalent,
or perhaps this still ends up producing an intermediate list. But at least it
*looks* better.

Figured out by poring over the function list in the lens docs looking for likely
candidates.

6 years agoUse mapM_ rather than mapM in the Section visitor
Greg Hurrell [Tue, 7 Jun 2016 16:39:59 +0000 (09:39 -0700)] 
Use mapM_ rather than mapM in the Section visitor

To make it clear that we don't care about the results, only the state.

6 years agoAdd Section visitor
Greg Hurrell [Tue, 7 Jun 2016 16:26:51 +0000 (09:26 -0700)] 
Add Section visitor

It's job is to check which kinds of annotations we have, in order to decide
which sections we need to render.

I am probably doing something clowny with the way I am mashing uniplate and
lenses etc together, but it does seem to work. That last `get`/`put` case is a
smell, but needed it given my use of `cosmosOf`; not sure how to avoid that.
Also, not sure why `mapM` does the right thing here, but it does.

6 years agoTry to trick linter about duplication
Greg Hurrell [Tue, 7 Jun 2016 14:29:42 +0000 (07:29 -0700)] 
Try to trick linter about duplication

It's been warning about this since forever:

```
Found:
  first <- firstLine
  rest <- many otherLine
  let nodes = concatMap appendWhitespace (first : rest)
  let compressed = compress nodes
  return
    (if last compressed == Whitespace then init compressed else
       compressed)

Why not:
  Combine with lib/Docvim/Parse.hs:202:7

lib/Docvim/Parse.hs:164:7: Warning: Reduce duplication
Found:
  first <- firstLine
  rest <- many otherLine
  let nodes = concatMap appendWhitespace (first : rest)
  let compressed = compress nodes
  return
    (if last compressed == Whitespace then init compressed else
       compressed)

Why not:
  Combine with lib/Docvim/Parse.hs:285:7
```

However, it is too smart. Even with this change, it still complains:

```
Found:
  first <- firstLine
  rest <- many otherLine
  let nodes = concatMap appendWhitespace (first : rest)
  let compressed = compress nodes
  return
    (if last compressed == Whitespace then init compressed else
       compressed)

Why not:
  Combine with lib/Docvim/Parse.hs:282:7

lib/Docvim/Parse.hs:165:7: Suggestion: Reduce duplication
Found:
  rest <- many otherLine
  let nodes = concatMap appendWhitespace (first : rest)
  let compressed = compress nodes
  return
    (if last compressed == Whitespace then init compressed else
       compressed)

Why not:
  Combine with lib/Docvim/Parse.hs:203:7
```

This one is tricky to factor out because of the dependence on bindings visible
within the scope of the defined functions, and also the monadic execution
context. I think the linter *is* probably right that there is a code smell here,
though; I just have to figure out how to remove it.

6 years agoAdd @option headings to Markdown printer
Greg Hurrell [Tue, 7 Jun 2016 14:23:35 +0000 (07:23 -0700)] 
Add @option headings to Markdown printer

6 years agoAdd a target for |:Command| links in Markdown
Greg Hurrell [Tue, 7 Jun 2016 14:15:11 +0000 (07:15 -0700)] 
Add a target for |:Command| links in Markdown

6 years agoRemove unnecessary explicit anchors in headings
Greg Hurrell [Tue, 7 Jun 2016 14:11:03 +0000 (07:11 -0700)] 
Remove unnecessary explicit anchors in headings

GitHub is going to add them anyway. Note that our |:Ack| links
don't work, because we aren't rendering that link target (we should).

6 years agoDo some linkification in the Markdown printer
Greg Hurrell [Tue, 7 Jun 2016 14:02:09 +0000 (07:02 -0700)] 
Do some linkification in the Markdown printer

This is provisional as I think putting the explicit link targets in the heading
for GitHub is wrong.

6 years agoTeach Markdown printer about @mapping and @command
Greg Hurrell [Tue, 7 Jun 2016 07:38:03 +0000 (00:38 -0700)] 
Teach Markdown printer about @mapping and @command

6 years agoAdd @mapping support to Vim printer
Greg Hurrell [Tue, 7 Jun 2016 07:28:20 +0000 (00:28 -0700)] 
Add @mapping support to Vim printer

6 years agoGet @command annotation working
Greg Hurrell [Tue, 7 Jun 2016 07:16:46 +0000 (00:16 -0700)] 
Get @command annotation working

6 years agoMake wrapping aware of concealed characters
Greg Hurrell [Tue, 7 Jun 2016 02:04:40 +0000 (19:04 -0700)] 
Make wrapping aware of concealed characters

This is the cheap-but-approximate approach. Results are reasonable, costs are
very low, and the consequences of being (slightly) wrong are livable. Let's go
with this for now.

6 years agoKill a stray comment
Greg Hurrell [Mon, 6 Jun 2016 15:57:19 +0000 (08:57 -0700)] 
Kill a stray comment

6 years agoUse worktree as issue tracker
Greg Hurrell [Mon, 6 Jun 2016 15:48:07 +0000 (08:48 -0700)] 
Use worktree as issue tracker

Taking standards to new lows.

6 years agoFix misplaced whitespace in output
Greg Hurrell [Mon, 6 Jun 2016 15:47:16 +0000 (08:47 -0700)] 
Fix misplaced whitespace in output

6 years agoAdd test showing @option output
Greg Hurrell [Mon, 6 Jun 2016 15:41:05 +0000 (08:41 -0700)] 
Add test showing @option output

Something buggy in the parser: note that we have to explicitly say "none" for
the no-default case, but I intended that to be simply omittable.

6 years agoPrint options
Greg Hurrell [Mon, 6 Jun 2016 15:31:14 +0000 (08:31 -0700)] 
Print options

Alignment will need a bit of work here, but this is a good first draft.

Specifically, if we want things to look like this in the UI:

                                g:SomeOpt
    g:SomeOpt        string (default: 10)

The output will actually need to be:

                                *g:SomeOpt*
    |g:SomeOpt|        string (default: 10)

Because `|` and `*` don't take up any width due to being concealed by Vim.

6 years agoFix lints
Greg Hurrell [Mon, 6 Jun 2016 14:46:18 +0000 (07:46 -0700)] 
Fix lints

6 years agoUse actual max int rather than hard-coded constant
Greg Hurrell [Mon, 6 Jun 2016 14:38:46 +0000 (07:38 -0700)] 
Use actual max int rather than hard-coded constant

6 years agoHandle overlength headings
Greg Hurrell [Mon, 6 Jun 2016 14:36:52 +0000 (07:36 -0700)] 
Handle overlength headings

#uglycode

6 years agoFix duplicate content
Greg Hurrell [Mon, 6 Jun 2016 14:17:10 +0000 (07:17 -0700)] 
Fix duplicate content

6 years agoInitial cut at @mapping, @command, @option, @function
Greg Hurrell [Mon, 6 Jun 2016 13:55:27 +0000 (06:55 -0700)] 
Initial cut at @mapping, @command, @option, @function

Still some bugs to sort out (eg. duplicate symbol table entry due to extra
`MappingsAnnotation` when we perform extraction) and polish to apply (not
actually printing the options/functions etc).

6 years agoMake Vim headings work by colocating link targets on same line
Greg Hurrell [Mon, 6 Jun 2016 08:03:58 +0000 (01:03 -0700)] 
Make Vim headings work by colocating link targets on same line

6 years agoAdd entries to symbol table for generated headings
Greg Hurrell [Mon, 6 Jun 2016 06:53:25 +0000 (23:53 -0700)] 
Add entries to symbol table for generated headings

6 years agoAutogen headings in Vim printer too
Greg Hurrell [Mon, 6 Jun 2016 06:38:46 +0000 (23:38 -0700)] 
Autogen headings in Vim printer too

6 years agoAdd auto-generated headings to Markdown printer
Greg Hurrell [Mon, 6 Jun 2016 06:19:08 +0000 (23:19 -0700)] 
Add auto-generated headings to Markdown printer

For @functions, @commands, @mappings, @options.

6 years agoAdd basic support for @options, @functions and @commands annotations
Greg Hurrell [Mon, 6 Jun 2016 05:14:09 +0000 (22:14 -0700)] 
Add basic support for @options, @functions and @commands annotations

Still need to auto-emit headings for these, but I think they basically work.
Also need to make `Option`, `Function` and `Command` visitors.

6 years agoOverhaul testing and compilation
Greg Hurrell [Sun, 5 Jun 2016 14:06:32 +0000 (07:06 -0700)] 
Overhaul testing and compilation

We now "compile" in the test suite, meaning that we pipe our translation units
through the various extraction transforms after parsing. This means three main
things:

- Everything is nested inside a `Project` node type now, consisting of one or
  more translation units.
- Nodes within the project are ordered (or reordered) to maintain desired
  section ordering.
- As we add more phases to "compilation" (eg. automated insertion of table
  of contents etc), these will get reflected in the test suite automatically.

As part of this, extracted test-specific bits out into a new `Util` module (ie.
pretty-printing methods, convenience functions) and the "compile" pipeline into
a `Compile` module.

6 years agoAdd a missing type annotation
Greg Hurrell [Sun, 5 Jun 2016 08:46:09 +0000 (01:46 -0700)] 
Add a missing type annotation