{
if (loop->index_var != NULL)
{
- msg (SE, _("Only one index clause may be specified."));
+ lex_error (lexer, _("Only one index clause may be specified."));
return false;
}
- if (lex_token (lexer) != T_ID)
- {
- lex_error (lexer, NULL);
- return false;
- }
+ if (!lex_force_id (lexer))
+ return false;
loop->index_var = dict_lookup_var (dataset_dict (ds), lex_tokcstr (lexer));
if (!loop->index_var)
3 | END LOOP.
| ^~~~~~~~
-loop.sps:5: error: LOOP: Only one index clause may be specified.
+loop.sps:5.15: error: LOOP: Only one index clause may be specified.
+ 5 | LOOP A=1 TO 5 B=1 TO 5.
+ | ^
-loop.sps:7.6: error: LOOP: Syntax error.
+loop.sps:7.6: error: LOOP: Syntax error expecting identifier.
7 | LOOP 5.
| ^
21 | LOOP A=1.
| ^~~~~~~~~
-loop.sps:23.6: error: LOOP: Syntax error.
+loop.sps:23.6: error: LOOP: Syntax error expecting identifier.
23 | LOOP !.
| ^