Ignore local vars

  • xman2002

    xman2002 - 2011-11-02


    I am using ND for documenting my action script code. Unfortunately ND also
    documents local variables and functions in my functions which is really
    useless. I already tried to change queries in the ActionsScript.pm file, but I
    got no satisfying results until now. I removed in %declarationEnders the
    private, function and var statements but interestingly without a different in
    the doc outputs (yes, I used the -r command line parameter to force a full

    What else can I do in this specific case?

    I also tried already changing topics and ignoring keywords, but this does not
    work properly, because ActionsScript is fully supported, which means that
    those comments are ignored indeed, but the local vars and function are still
    listed. I don't want to use -do command line parameter.

    Thanks in advance!

  • Greg Valure

    Greg Valure - 2011-11-02

    It documents variables when the declarations are inside a function? Post a
    test case and I'll look at it.

  • xman2002

    xman2002 - 2011-11-02

    Hey, thank you for your quick reply. Because you seemed a bit astonished about
    this issue I did some further research on this issue and found out, that the
    described behaviour is not always the case. The issue is the following:

    NaturalDocs cannot handle ActionsScript Vectors. Vectors in Actionsscript are
    strictly typed arrays. Vectors are declared in the following way:

    var myVector:Vector.<type> = new Vector.<type>. You can replace type by
    any Type like int, string, boolean oder komplex classes as DisplayObject or
    own defined Classes.

    ND obviously cannot parse files with those statements in functions (as
    paramaters or as return type). It skips the line and continues with all local
    vars until the end of the function. The same is valid for vector var
    declarations: they are not listed correctly.

    Vectors are relatively new elements in Flash/ActionsScript and they have a
    very special syntax (<...>) which seems to be the reason why it is not
    supported until now.

    I hope vector classes will be supported at some time.

  • xman2002

    xman2002 - 2011-11-02

    I have done some modifications in actionscript.pm file, so vectors are working
    now for both vars and functions. In functions they are recognized fully
    correct, vars do not show automatically of which type the vector is right now.

    I have done several combinations of modifications until it worked properly, so
    I don't know anymore which of them are really nescessary to make it work. I
    actually do not even know the language it is written in (perl?). but I still
    can send you a copy of that file, if you wish so, to integrate parts of it to
    the official code.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks