Jump to content

Hscript Beautifier


AlSk

Recommended Posts

Hi everyone,

I am searching for a solution to style a hscript expression. I am looking for something like, http://jsbeautifier.org/ just for hscript. In dont't think there is something out there particularly for Hscript, but maybe someone knows a tool where i can set rules to format my code. In fact it would only need 3 rules:

1. after every ( do a line break + tab
2. ahead every ) do a line break + shiftTab
3. after every , do a line break

So for example you get from this:
 

length(dopoption($DOPNET, $OBJID, "PointPosition", "velx"),dopoption($DOPNET, $OBJID, "PointPosition", "vely"), dopoption($DOPNET, $OBJID, "PointPosition", "velz")) - length(dopoption($DOPNET, $OBJID, "PointPosition", "oldvelx"), dopoption($DOPNET, $OBJID, "PointPosition", "oldvely"), dopoption($DOPNET, $OBJID, "PointPosition", "oldvelz"))


something like that:
 

length(
    dopoption(
        $DOPNET,
        $OBJID,
        "PointPosition",
        "velx"
    ),
    dopoption(
        $DOPNET,
        $OBJID,
        "PointPosition",
        "vely"
    ),
    dopoption(
        $DOPNET,
        $OBJID,
        "PointPosition",
        "velz"
    )
) - length(
    dopoption(
        $DOPNET,
        $OBJID,
        "PointPosition",
        "oldvelx"
    ),
    dopoption(
        $DOPNET,
        $OBJID,
        "PointPosition",
        "oldvely"
    ),
    dopoption(
        $DOPNET,
        $OBJID,
        "PointPosition",
        "oldvelz"
    )
)
Edited by AlSk
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...