Fix parser code style
This commit is contained in:
parent
dc42991ecb
commit
334c6c7f39
|
|
@ -260,8 +260,8 @@ int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
char v = lines[i][c];
|
char v = lines[i][c];
|
||||||
if (v == ' ') spaceCount++;
|
if (v == ' ') spaceCount++;
|
||||||
if (v == ';' && spaceCount == 2) validAlias = true;
|
if ((v == ';') && (spaceCount == 2)) validAlias = true;
|
||||||
if (v == ';' || v == '(' || v == '\0') break;
|
if ((v == ';') || (v == '(') || (v == '\0')) break;
|
||||||
}
|
}
|
||||||
if (!validAlias) continue;
|
if (!validAlias) continue;
|
||||||
aliasLines[aliasCount] = i;
|
aliasLines[aliasCount] = i;
|
||||||
|
|
@ -273,7 +273,7 @@ int main(int argc, char* argv[])
|
||||||
for (int i = 0; i < linesCount; i++)
|
for (int i = 0; i < linesCount; i++)
|
||||||
{
|
{
|
||||||
// Read enum line
|
// Read enum line
|
||||||
if (IsTextEqual(lines[i], "typedef enum {", 14) && lines[i][TextLength(lines[i])-1] != ';') // ignore inline enums
|
if (IsTextEqual(lines[i], "typedef enum {", 14) && (lines[i][TextLength(lines[i])-1] != ';')) // ignore inline enums
|
||||||
{
|
{
|
||||||
// Keep the line position in the array of lines,
|
// Keep the line position in the array of lines,
|
||||||
// so, we can scan that position and following lines
|
// so, we can scan that position and following lines
|
||||||
|
|
@ -286,7 +286,7 @@ int main(int argc, char* argv[])
|
||||||
for (int i = 0; i < linesCount; i++)
|
for (int i = 0; i < linesCount; i++)
|
||||||
{
|
{
|
||||||
int j = 0;
|
int j = 0;
|
||||||
while (lines[i][j] == ' ' || lines[i][j] == '\t') j++; // skip spaces and tabs in the begining
|
while ((lines[i][j] == ' ') || (lines[i][j] == '\t')) j++; // skip spaces and tabs in the begining
|
||||||
// Read define line
|
// Read define line
|
||||||
if (IsTextEqual(lines[i]+j, "#define ", 8))
|
if (IsTextEqual(lines[i]+j, "#define ", 8))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user