]> granicus.if.org Git - clang/commit
Allow the preprocessor to cache the lexed tokens, so that we can do efficient lookahe...
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Sun, 10 Aug 2008 13:15:22 +0000 (13:15 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Sun, 10 Aug 2008 13:15:22 +0000 (13:15 +0000)
commit03db1b31dd926409b7defc1c90b66549464652c0
treeea9d1600a9098e36c5ec0da6632e44180d1ad9d4
parent9ca8bb0996bbb8b9dbf69c51cb3d1523559e47e3
Allow the preprocessor to cache the lexed tokens, so that we can do efficient lookahead and backtracking.

1) New public methods added:
  -EnableBacktrackAtThisPos
  -DisableBacktrack
  -Backtrack
  -isBacktrackEnabled

2) LookAhead() implementation is replaced with a more efficient one.
3) LookNext() is removed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54611 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Lex/Preprocessor.h
include/clang/Parse/Parser.h
lib/Lex/PPCaching.cpp [new file with mode: 0644]
lib/Lex/PPLexerChange.cpp
lib/Lex/Preprocessor.cpp