[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue 5415: Fix type-conversion warnings in parser and lexer (issue 3489
From: |
dak |
Subject: |
Issue 5415: Fix type-conversion warnings in parser and lexer (issue 348990043 by address@hidden) |
Date: |
Sun, 09 Sep 2018 02:45:53 -0700 |
https://codereview.appspot.com/348990043/diff/1/lily/includable-lexer.cc
File lily/includable-lexer.cc (right):
https://codereview.appspot.com/348990043/diff/1/lily/includable-lexer.cc#newcode163
lily/includable-lexer.cc:163: for (size_t i = 0; i < count; ++i)
Factoring this out into a separate function is a good idea. That makes
it worth thinking about a more efficient replacement at some future
point of time.
https://codereview.appspot.com/348990043/diff/1/lily/include/keyword.hh
File lily/include/keyword.hh (right):
https://codereview.appspot.com/348990043/diff/1/lily/include/keyword.hh#newcode40
lily/include/keyword.hh:40: int lookup (char const *s) const;
This seems like a change not in line with what we do elsewhere. What
was the problem mandating this change?
https://codereview.appspot.com/348990043/diff/1/lily/parser.yy
File lily/parser.yy (right):
https://codereview.appspot.com/348990043/diff/1/lily/parser.yy#newcode161
lily/parser.yy:161: if (Token != END_OF_FILE) \
This isn't really about END_OF_FILE at all but about whether there is a
token to be pushed back. It turns out that MYBACKUP currently is called
only with constant non-zero Token: maybe that code was from a time when
MYREPARSE was not yet in use? So instead of rewording in a dubious
manner, the whole if-condition should be thrown out (I don't remember
what it was good for) and the indentation of the consequent now
unconditional statement corrected.
https://codereview.appspot.com/348990043/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Issue 5415: Fix type-conversion warnings in parser and lexer (issue 348990043 by address@hidden),
dak <=