Commit Graph

4 Commits

Author SHA1 Message Date
John Kessenich
9840f11f85 PP: Fix #1694: Handle badly formed argument substitution.
Also added a warning for no space after a macro name.
2019-02-11 03:05:00 -07:00
John Kessenich
e7e081bda9 PP: don't give errors on some tokens under #if 0 (or similar).
Fixes #1295.

Tokens that are accepted by any version of HLSL or GLSL should be
allowed when #ifdef'd off, such that errors are not reported.
2018-03-19 00:43:18 -06:00
John Kessenich
11e1a073f3 PP: Fix issue #407; handle empty identifier.
The sequence

  #define m()
  int m"

creates a token of no length (a string of 0 size).  Protect
against a string of 0 size as well as the existing protect
against a null string.
2016-07-30 13:39:52 -06:00
John Kessenich
73d4fb5bc5 PP: Fix issue #408: # as last character in macro.
This would look ahead for a second #, for token pasting, and if not
found, backup one token.  This is fine, unless at the end of line,
which would backup the #, rather than the look ahead.
2016-07-30 12:41:35 -06:00