Jump to content
Sign in to follow this  
AlSk

Hscript Beautifier

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

Share this post


Link to post
Share on other sites

Thank you, I'll try it.

Edited by AlSk

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×