[PATCH] D130160: [pseudo] Eliminate the dangling-else syntax ambiguity.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 21 01:37:37 PDT 2022


hokein added inline comments.


================
Comment at: clang-tools-extra/pseudo/include/clang-pseudo/Language.h:25
+  const TokenStream &Tokens;
+  SymbolID Lookahead;
+};
----------------
sammccall wrote:
> passing the position in the stream would be more general, there's no reason in particular that the amount of lookahead the guard needs is the same as what we have in GLR
> 
> OTOH as long as it *is* the same this is probably faster
+1, agree. This'd requires some non-trivial changes in the GLR because we use Lookahead in the Reduce rather than the token stream index. I think it is better to do it in a followup patch. I added a FIXME.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130160/new/

https://reviews.llvm.org/D130160



More information about the cfe-commits mailing list