[PATCH] D143148: [clang-repl] Add basic multiline input support

Vassil Vassilev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 15 00:02:24 PST 2023


v.g.vassilev added inline comments.


================
Comment at: clang/lib/Interpreter/IncrementalParser.cpp:260
+                                                 std::error_code());
+    Token Tok;
+    do {
----------------
I think we can simplify the heuristics here by asking if the end source location of the last created declaration is the same as the parser/lexer current token that is observed before EOF. If that's the case, then we are done. If not we can request more input.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143148



More information about the cfe-commits mailing list