- if (var_is_alpha (vars[0]))
- {
- if (lex_token (lexer) != T_STRING)
- {
- lex_error (lexer, _("expecting string"));
- return 0;
- }
- width = MAX_SHORT_STRING;
- value_init (&value, width);
- buf_copy_str_rpad (value_str_rw (&value, width), width,
- ds_cstr (lex_tokstr (lexer)), ' ');
- }
- else
- {
- if (!lex_is_number (lexer))
- {
- lex_error (lexer, _("expecting number"));
- return 0;
- }
- width = 0;
- value_init (&value, width);
- value.f = lex_tokval (lexer);
- }
- lex_get (lexer);
+ value_init (&value, width);
+ if (!parse_value (lexer, &value, width))
+ {
+ value_destroy (&value, width);
+ return 0;
+ }