[Tool/Web/Other] (Online) Tidy Code and Bracket Finder
#1

This is a tool to find brackets lost and tidy your code.




Link

http://ipsbr.net/portal/tabulador/





Code

http://pastebin.com/w6bwy97E

The new version works with strings and comments

Made in Javascript by me. This is free source code.




Example

(this only works in these cases)
pawn Code:
if (dataLength % 3){
static pads ;
    pads = dataLength % 3;

// print("hey, ho \"lets go\" "); {

for (; pads < 3; pads++)
            result[resultIndex++] = '=';
}

to


pawn Code:
if (dataLength % 3){
    static pads ;
    pads = dataLength % 3;

    // print("hey, ho \"lets go\" "); {

    for (; pads < 3; pads++)
    result[resultIndex++] = '=';
}

Thanks.
Reply
#2

Nice work. Good for lazy scripters who doesn't wants to use TAB. Does your bracket finder doesn't count the commented bracket?
Reply
#3

In most cases, it works with comments


Example:

pawn Code:
func(...) {
    // {


   

/*
    {

    {

    {
    */


    print("{ wow its work");
}
dont warn, if i put:

pawn Code:
func(...) {
    // {

{

    /* {

    {

    {

    {
    */



    print("{ wow its work");
}
he return:

Code:
Existem 1   { a mais demais no cуdigo

O erro foi encontrado antes da linha 3 no bracket 1
LINE 3, BRACKET 1


or



pawn Code:
func(...) {
    // {

{

    /* {

    {

    {

    {
    */


{{
    print("{ wow its work");
}
Code:
Existem 3   { a mais demais no cуdigo
O erro foi encontrado depois da linha 18 no bracket 3
Large scripts too: (no my script)

without tool:
http://pastebin.com/WDh2k22F

with tool:
http://pastebin.com/Agj4NmHX

Thanks Man
Reply
#4

Good Job ipsBruno =D
Reply
#5

Testing it with 90k lines script
Reply
#6

Quote:
Originally Posted by Gogorakis
View Post
Testing it with 90k lines script
and works 100%, works.



If works fine to you, warn me : P
Reply
#7

I made small changes. Now calculating with more accurately the "lost brackets".

Thanks.
Reply
#8

Hm, good for newbies who think they are the best scripters ever lol.
Reply
#9

Quote:
Originally Posted by DanishHaq
View Post
Hm, good for newbies who think they are the best scripters ever lol.
Yeah Thanks!
Reply
#10

simply awesome! i can see many ppl with untidy unreadable codes , this surely help to improve it
good work.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)