• R/O
  • SSH
  • HTTPS

yash: Commit


Commit MetaInfo

Revision3880 (tree)
Time2018-09-19 00:55:23
Authormagicant

Log Message

Use parse_word_to directly

This refactoring removes the use of the parse_word function in favor of
the parse_word_to function.

Change Summary

Incremental Difference

--- yash/branches/token_based_parser/parser.c (revision 3879)
+++ yash/branches/token_based_parser/parser.c (revision 3880)
@@ -1039,7 +1039,7 @@
10391039 /* Okay, the next token seems to be a word, possibly being a
10401040 * reserved word or an IO_NUMBER token. */
10411041 ps->index = index;
1042- wordunit_T *token = parse_word(ps, false);
1042+ wordunit_T *token = parse_word_to(ps, is_token_delimiter_char);
10431043 index = ps->index;
10441044
10451045 wordfree(ps->token);
@@ -2324,7 +2324,7 @@
23242324 psubstitute_alias_recursive(ps, 0);
23252325
23262326 size_t startindex = ps->index;
2327- wordfree(parse_word(ps, false));
2327+ wordfree(parse_word_to(ps, is_token_delimiter_char));
23282328 assert(startindex <= ps->index);
23292329 return xwcsndup(&ps->src.contents[startindex], ps->index - startindex);
23302330 }
Show on old repository browser