X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=src%2Fts_text.c;h=ed3f827074f1eaf12f39e3e7cd9314e484a26d55;hp=347c28cd0c5dafbd75a86633feeee0429f8d18fb;hb=637ca39c29b03bd3a2beb99521753e83c043283f;hpb=b9ebecd3c02d5a5570d9b64190d76da78edb2d64 diff --git a/src/ts_text.c b/src/ts_text.c index 347c28c..ed3f827 100644 --- a/src/ts_text.c +++ b/src/ts_text.c @@ -216,9 +216,9 @@ static int next_token(struct parser *pst) DYNARR_CLEAR(pst->token); - // skip whitespace + /* skip whitespace */ while((c = fgetc(pst->fp)) != -1) { - if(c == '#') { // skip to end of line + if(c == '#') { /* skip to end of line */ while((c = fgetc(pst->fp)) != -1 && c != '\n'); if(c == -1) return -1; } @@ -230,7 +230,7 @@ static int next_token(struct parser *pst) DYNARR_STRPUSH(pst->token, c); if(isdigit(c) || c == '-' || c == '+') { - // token is a number + /* token is a number */ int found_dot = 0; while((c = fgetc(pst->fp)) != -1 && (isdigit(c) || (c == '.' && !found_dot))) { @@ -241,7 +241,7 @@ static int next_token(struct parser *pst) return TOK_NUM; } if(isalpha(c)) { - // token is an identifier + /* token is an identifier */ while((c = fgetc(pst->fp)) != -1 && (isalnum(c) || c == '_')) { DYNARR_STRPUSH(pst->token, c); } @@ -249,8 +249,8 @@ static int next_token(struct parser *pst) return TOK_ID; } if(c == '"') { - // token is a string constant - // remove the opening quote + /* token is a string constant */ + /* remove the opening quote */ DYNARR_STRPOP(pst->token); while((c = fgetc(pst->fp)) != -1 && c != '"') { DYNARR_STRPUSH(pst->token, c);