Clean indentation

This commit is contained in:
caskd 2019-10-30 23:54:11 +01:00
parent ee26ca9c27
commit a300e1cc32
No known key found for this signature in database
GPG Key ID: 79DB21404E300A27
2 changed files with 122 additions and 128 deletions

View File

@ -21,26 +21,35 @@ int synthaxcheck(void) {
switch (c) {
case '"': {
if (sq == 0 && mc == 0 && sc == 0) {
if (dq == 1) {
dq = 0;
} else {
dq = 1;
}
dq = !dq;
}
break;
}
case '\'': {
if (dq == 0 && mc == 0 && sc == 0) {
if (sq == 1) {
sq = 0;
} else {
sq = 1;
}
sq = !sq;
}
break;
}
case '\n': {
if (dq == 0 && sq == 0) {
col = 0;
line++;
} else if (dq != 0) {
result = 4;
} else if (sq != 0) {
result = 3;
}
if (sc != 0) {
sc = 0;
}
break;
}
default: break;
}
if (sq == 0 && dq == 0) {
if (mc == 0 && sc == 0) {
switch (c) {
case '{': {
cb++;
break;
@ -65,7 +74,10 @@ int synthaxcheck(void) {
rb--;
break;
}
default: break;
}
}
switch (c) {
case '/': {
if (lastchar == '/') {
sc = 1;
@ -80,30 +92,12 @@ int synthaxcheck(void) {
}
break;
}
}
case '\n': {
if (dq == 0 && sq == 0) {
col = 0;
line++;
} else if (dq != 0) {
result = 4;
} else if (sq != 0) {
result = 3;
}
if (sc != 0) {
sc = 0;
}
break;
}
default: break;
}
}
col++;
if (lastchar == '\\') {
lce = 1;
} else {
lce = 0;
}
col++;
lce = (lastchar == '\\');
lastchar = c;
}
unmcol = col;