static void findBasicTags (void) { const char *line; KeyWord *keywords; keywords = freebasic_keywords; while ((line = (const char *) readLineFromInputFile ()) != NULL) { const char *p = line; KeyWord const *kw; while (isspace (*p)) p++; /* Empty line or comment? */ if (!*p || *p == '\'') continue; /* In Basic, keywords always are at the start of the line. */ for (kw = keywords; kw->token; kw++) if (match_keyword (p, kw)) break; /* Is it a label? */ match_colon_label (p); } }
static void findBasicTags (void) { const char *line; const char *extension = fileExtension (getInputFileName ()); KeyWord *keywords; if (strcmp (extension, "bb") == 0) keywords = blitzbasic_keywords; else if (strcmp (extension, "pb") == 0) keywords = purebasic_keywords; else keywords = freebasic_keywords; while ((line = (const char *) readLineFromInputFile ()) != NULL) { const char *p = line; KeyWord const *kw; while (isspace (*p)) p++; /* Empty line? */ if (!*p) continue; /* In Basic, keywords always are at the start of the line. */ for (kw = keywords; kw->token; kw++) if (match_keyword (p, kw)) break; /* Is it a label? */ if (strcmp (extension, "bb") == 0) match_dot_label (p); else match_colon_label (p); } }