+ Reply to Thread
Results 1 to 2 of 2

Thread: to developers of SVN'd E2 extensions: E2 registerFunction->e2function converter

  1. #1
    Bug Buster TomyLobo's Avatar
    Join Date
    Feb 2009
    Posts
    2,796

    Default to developers of SVN'd E2 extensions: E2 registerFunction->e2function converter

    Eh?
    I made a converter, that converts from the old registerFunction format to the new e2function format.

    To facilitate the development of his online documentation system, Syranide was going to apply it to all of the existing extensions, but maybe one of you extension devs wants to apply the converter himself.

    Usage
    converter is attached, have fun with it.
    Use it by simply executing the file with any lua interpreter and doing conv("input.lua", "output.lua")
    By default, it doesn't convert operators, since some operators use non-standard fetching code, which litters the console with errors.
    To enable operator conversion, change line 2 to "local convert_operators = true"
    If there are any unexplainable errors or warnings, post here.

    What it doesn't do yet
    some operators (++/inc --/dec =/ass $/dlt)
    non-standard fetching, like here:
    [highlight=Lua]registerOperator("add", "nn", "n", function(self, args)
    local op1, op2 = args[2], args[3]
    return op1[1](self, op1) + op2[1](self, op2)
    end)[/highlight]

    Disclaimer
    If there are any warnings, the resulting code is unpredictable. Fix all warnings and test the code before uploading it anywhere.
    This tool is for wiresvn extensions only. It may or may not work with custom extensions but these are not the scope of this tool.
    Attached Files Attached Files
    Last edited by TomyLobo; 06-30-2009 at 06:50 PM.
    "It's easy to win forgiveness for being wrong; being right is what gets you into real trouble." - Bjarne Stroustrup

    Lífið læðist lúmskt áfram

  2. #2
    Expressionism 2.0 Syranide's Avatar
    Join Date
    Mar 2007
    Location
    Sweden
    Posts
    4,573

    Default re: to developers of SVN'd E2 extensions: E2 registerFunction->e2function converter

    Ah sweet.

    10chars

+ Reply to Thread

Similar Threads

  1. E2 extensions
    By Glenni in forum Installation and Malfunctions Support
    Replies: 18
    Last Post: 10-21-2010, 02:50 PM
  2. [E2] E:freeze() function with e2function syntax?
    By S1L3NT in forum Wiremod Addons & Coding
    Replies: 2
    Last Post: 06-19-2009, 07:18 AM
  3. [E2] Converter
    By warrior08 in forum Expression 2 Discussion & Help
    Replies: 4
    Last Post: 06-02-2009, 08:56 AM
  4. Replies: 33
    Last Post: 04-23-2009, 10:10 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots