diff options
author | Robin Gareus <robin@gareus.org> | 2016-04-10 23:34:00 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-04-10 23:34:00 +0200 |
commit | 121cd66fd6295e4fb926460c1e4a2f4dbb621160 (patch) | |
tree | b50a7ee1faf2892e114b9d9cf62da846f2260475 /tools/fmt-luadoc.php | |
parent | 49656a2d7cf1290de5000969998685c647dd8bcc (diff) |
update lua class documentation scripts
Diffstat (limited to 'tools/fmt-luadoc.php')
-rwxr-xr-x | tools/fmt-luadoc.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tools/fmt-luadoc.php b/tools/fmt-luadoc.php index 2656b7e330..defe706b51 100755 --- a/tools/fmt-luadoc.php +++ b/tools/fmt-luadoc.php @@ -34,6 +34,7 @@ foreach (json_decode ($json, true) as $b) { if (isset ($b['version'])) { $ardourversion = $b['version']; } continue; } + $b ['lua'] = preg_replace ('/:_end/', ':end', $b ['lua']); $b ['ldec'] = preg_replace ('/ const/', '', preg_replace ('/ const&/', '', $b['decl'])); if (isset ($b['ret'])) { $b['ret'] = preg_replace ('/ const/', '', preg_replace ('/ const&/', '', $b['ret'])); @@ -125,7 +126,7 @@ function stripclass ($classname, $name) { function datatype ($decl) { # TODO handle spaces in type. Works because # we don't yet have templated types (with_space <here >) - return substr ($decl, 0, strpos ($decl, ' ')); + return substr ($decl, 0, strrpos ($decl, ' ')); } function luafn2class ($lua) { @@ -342,6 +343,18 @@ foreach ($doc as $b) { 'cand' => canonical_decl ($b) ); break; + case "Free C Function": + $funclist[luafn2class ($b['lua'])][] = array ( + 'bind' => $b, + 'name' => $b['lua'], + 'args' => $args, + 'ret' => $ret, + 'ref' => false, + 'ext' => true, + 'cand' => str_replace (':', '::', $b['lua']).'(lua_State*)' + ); + fwrite (STDERR, print_r ($b, true)); + break; case "Free Function": case "Free Function RefReturn": $funclist[luafn2class ($b['lua'])][] = array ( @@ -947,6 +960,7 @@ echo '</ul>'.NL; # see how far there is still to go... fwrite (STDERR, "Found $dox_found annotations. missing: $dox_miss\n"); +echo '<!-- '.$dox_found.' / '.$dox_miss.' !-->'.NL; ?> </div> |