lexer: Fix implementation of lex_force_string_or_id().
[pspp] / src / language / lexer / lexer.c
index 08d35d8c00312d98d2baeb7e80ff04141037b9f9..a3642f8a6c6f7e7f5fc5b9376ee31db8308e9efa 100644 (file)
@@ -613,7 +613,7 @@ lex_force_match (struct lexer *lexer, enum token_type type)
        }
       else
        lex_error_expecting (lexer, token_type_to_name (type), NULL_SENTINEL);
-      
+
       return false;
     }
 }
@@ -644,7 +644,7 @@ lex_force_string (struct lexer *lexer)
 bool
 lex_force_string_or_id (struct lexer *lexer)
 {
-  return lex_is_integer (lexer) || lex_force_string (lexer);
+  return lex_token (lexer) == T_ID || lex_force_string (lexer);
 }
 
 /* If the current token is an integer, does nothing and returns true.