Giter Club home page Giter Club logo

Comments (4)

stevedonovan avatar stevedonovan commented on September 25, 2024

Hi Geoff, try the latest push - it's following your type convention as well, so '-- string: an argument' is equivalent to @tparam string ....

from ldoc.

geoffleyland avatar geoffleyland commented on September 25, 2024

On 29/10/2012, at 6:57 AM, Steve J Donovan [email protected] wrote:

Hi Geoff, try the latest push - it's following your type convention as well, so '-- string: an argument' is equivalent to @tparam string ....

Thanks! Four things:

  • ldoc.lua needs to require "pl.dir"; tools.lua needs to require "pl.tablex"
  • how about this (I'll have a look at the patch more closely and see if I can work this out, but at the moment it's all afrikaans to me):

function a(
b, -- string: unfortunately
-- this comment stretches over
-- more than one line
c) -- number: and so
-- does this one

  • or this:

function a(
b) -- ?string|number: syntax borrowed from sierra - we could change it if it's easier.

  • and here's an install-only makefile (let me know if you'd prefer I forked and issued a pull request):

LUA= $(shell echo which lua)
LUA_BINDIR= $(shell echo dirname $(LUA))
LUA_PREFIX= $(shell echo dirname $(LUA_BINDIR))
LUA_SHAREDIR=$(LUA_PREFIX)/share/lua/5.1

ldoc:

install: install_parts
echo "lua $(LUA_SHAREDIR)/ldoc.lua $$*" > $(LUA_BINDIR)/ldoc
chmod +x $(LUA_BINDIR)/ldoc

install_luajit: install_parts
echo "luajit $(LUA_SHAREDIR)/ldoc.lua $$*" > $(LUA_BINDIR)/ldoc
chmod +x $(LUA_BINDIR)/ldoc

install_parts:
mkdir -p $(LUA_SHAREDIR)
cp ldoc.lua $(LUA_SHAREDIR)
cp -r ldoc $(LUA_SHAREDIR)

uninstall:
-rm $(LUA_SHAREDIR)/ldoc.lua
-rm -r $(LUA_SHAREDIR)/ldoc
-rm $(LUA_BINDIR)/ldoc

from ldoc.

geoffleyland avatar geoffleyland commented on September 25, 2024

Hi Steve,

I've cloned LDoc, and my clone has patches for everything mentioned above. Let me know if you want a pull request.

from ldoc.

stevedonovan avatar stevedonovan commented on September 25, 2024

On Sun, Oct 28, 2012 at 10:13 PM, Geoff Leyland
[email protected] wrote:

  • how about this (I'll have a look at the patch more closely and see if I can work this out, but at the moment it's all afrikaans to me):

Hah ;) The part that's double-dutch to me currently is the
association of attributes with tags - it keeps slipping in and out of
comprehension - time for 'helpful comments'...

function a(
b, -- string: unfortunately
-- this comment stretches over
-- more than one line
c) -- number: and so
-- does this one

Now this would be consistent with how we use the @param tag anyway. I
would have to grab all the comment tokens, no sweat. But the trailing
one will be tricky, since it involves look-ahead.

function a(
b) -- ?string|number: syntax borrowed from sierra - we could change it if it's easier.

No problem - the type is simply defined as everything up to the colon.
LDoc does not do interpretation of types, with the exception of names
which can be resolved as known types.

  • and here's an install-only makefile (let me know if you'd prefer I forked and issued a pull request):

That's useful - actually it would work well if you issued a pull
request. Then the paper trail is complete ;)

steve d.

from ldoc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.