* Lexer code
*/
-char* *lex_filenames;
+static char* *lex_filenames;
-void lexerror(lex_file *lex, const char *fmt, ...)
+static void lexerror(lex_file *lex, const char *fmt, ...)
{
va_list ap;
va_end(ap);
}
-bool lexwarn(lex_file *lex, int warntype, const char *fmt, ...)
+static bool lexwarn(lex_file *lex, int warntype, const char *fmt, ...)
{
bool r;
lex_ctx ctx;
static int lex_fgetc(lex_file *lex)
{
if (lex->file)
- return fgetc(lex->file);
+ return fs_file_getc(lex->file);
if (lex->open_string) {
if (lex->open_string_pos >= lex->open_string_length)
return EOF;
lex->line = line;
while (ch != '\n' && ch != EOF)
ch = lex_getch(lex);
+ vec_free(command);
+ vec_free(param);
+ vec_free(pragma);
return true;
unroll:
vec_free(command);
lex_ungetch(lex, ' ');
}
- if (command) {
- vec_pop(command);
- while (vec_size(command)) {
- lex_ungetch(lex, (unsigned char)vec_last(command));
- vec_pop(command);
+ if (param) {
+ vec_pop(param);
+ while (vec_size(param)) {
+ lex_ungetch(lex, (unsigned char)vec_last(param));
+ vec_pop(param);
}
- vec_free(command);
+ vec_free(param);
lex_ungetch(lex, ' ');
}
if (pragma) {
/*
case '+':
case '-':
- */
+ */
case '*':
case '/':
case '<':