-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Better html links #793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better html links #793
Conversation
|
Ah, it was an assert crashing, |
|
There you go. Fixed and working with |
|
Wouldn't the links be even nicer if they look like this: |
|
And even nicer if they sorted alphabetically for each term rather than the current mess. The changes so far were to make hrefs unique and the index look is just a side-effect of it not using anything more elaborate than the href to display to the user, since the I think http://dl.dropboxusercontent.com/u/145894/t/ndocs/rstgen.html#setIndexTerm could accept an additional default parameter with the wanted look for the index hyperlink. Do you know if it is safe for the index files to grow a third column to store it? Is there any other program reading index files? |
|
I don't think the index file is meant for anything besides humans at the moment, but @Araq may know better. |
The .idx file format was extended to contain two columns more, one with the text of the href, one with a title which browsers render as popups.
|
Bumped with better index. |
|
Replaced by #850. |
## Summary Move the routines and types that make up the DSL to the `mirconstr` module and use the DSL in both the `injectdestructors` and `mirbridge` module. Apart from making the MIR code generation in both modules less complex, manual, and error-prone, this is also significant progress towards the MIR code coming out of the `injectdestructors` pass having proper type information, which is a requirement for having MIR passes that run after `injectdestructors`. ## Details * move the `EValue` and `ChainEnd` types to `mirconstr` * move the atomic DSL operands to `mirconstr`. The `notOp`, `modify`, `outOp`, and `tupleAccess` operands stay in `mirgen` * add wrapper templates for DSL operands that `mirgen` still calls with a `TCtx` instance instead of a `MirNodeSeq` As part of moving them, some operand routines that had a 'gen' prefix are changed to not have it, making the routine names more consistent. In addition, some cleanup in `mirconstr` is performed, and the DSL extended a bit: * `|=>`, `=>|`, and `previous` are removed. They were unused and didn't fit in with the overall design * the `emit`, `symbol`, and `opParam` operands are added, all of which are only useful outside of `mirgen` Another addition is the `predicate` meta operand, which makes it possible to write chains where an operand is conditionally excluded: ```nim chain(...): a() => predicate(cond) => b() => c() ``` Here, `b()` is only evaluated if `cond` evaluates to 'true'. Using two chains plus an in-between 'if' statement was previously necessary to achieve the same. Finally, documentation about the DSL is added, and the `injectdestructors` and `mirbridge` modules are changed to use the DSL for generating MIR code. The logic from the `genInjectedSink` procedure was previously duplicated into `genSinkFromTemporary`, but this is now fixed.
The following changes work fine in
doccommands except for the lack of types when a parameter is found with a default parameter but without a specified type. When I try to run indoc2mode I don't seem to make sense of thesymstructure and the proc to convert thetypto a string sigsevs without a call stack, so I don't know where what is failing.