Documentation from C headers #10602
rodrigo-dc
started this conversation in
Show and tell
Replies: 2 comments 2 replies
-
Very cool! I love how you are using Lpeg to parse the code.
|
Beta Was this translation helpful? Give feedback.
1 reply
-
It is probably more efficient to assemble patterns used in functions outside the function so that they are assembled only once and not every time the function is called. If you want to keep the variables more localized you can create a scope with a do block local my_function
do
my_pattern = (assemble pattern)
my_function = function(args)
-- my_pattern is visible here
end
end
-- function works here but variable is invisible |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi.
I have created my very first pandoc Lua filter: https://codeberg.org/rodrigo-dc/documento.git
It basically extracts documentation from a C header file and inserts it in the document. You can control how/where the documentation will be inserted by using "tags" like
%ALL%
.I would really appreciate any input, specially regarding the pandoc-specific code.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions