@@ -1135,7 +1135,7 @@ struct Preprocessor::Private {
11351135 [[nodiscard]] auto parseMacroDefinition (TokList *ts) -> Macro;
11361136
11371137 [[nodiscard]] auto expand (const std::function<void (const Tok *)> &emitToken)
1138- -> Status ;
1138+ -> PreprocessingState ;
11391139
11401140 [[nodiscard]] auto expandTokens (TokIterator it, TokIterator last,
11411141 bool inConditionalExpression) -> TokIterator;
@@ -1650,7 +1650,7 @@ auto Preprocessor::Private::expandTokens(TokIterator it, TokIterator last,
16501650}
16511651
16521652auto Preprocessor::Private::expand (
1653- const std::function<void (const Tok *)> &emitToken) -> Status {
1653+ const std::function<void (const Tok *)> &emitToken) -> PreprocessingState {
16541654 if (buffers_.empty ()) return ProcessingComplete{};
16551655
16561656 auto buffer = buffers_.back ();
@@ -2934,8 +2934,7 @@ void Preprocessor::preprocess(std::string source, std::string fileName,
29342934 endPreprocessing (tokens);
29352935}
29362936
2937- void Preprocessor::PendingInclude::resolveWith (
2938- std::optional<std::string> fileName) const {
2937+ void PendingInclude::resolveWith (std::optional<std::string> fileName) const {
29392938 auto d = preprocessor.d .get ();
29402939
29412940 if (!fileName.has_value ()) {
@@ -2952,7 +2951,7 @@ void Preprocessor::PendingInclude::resolveWith(
29522951 fs::path dirpath = fs::path (continuation->fileName );
29532952 dirpath.remove_filename ();
29542953
2955- d->buffers_ .push_back (Private::Buffer{
2954+ d->buffers_ .push_back (Preprocessor:: Private::Buffer{
29562955 .source = continuation,
29572956 .currentPath = dirpath,
29582957 .ts = continuation->tokens ,
@@ -3003,7 +3002,8 @@ void Preprocessor::endPreprocessing(std::vector<Token> &tokens) {
30033002 tk.setFileId (mainSourceFileId);
30043003}
30053004
3006- auto Preprocessor::continuePreprocessing (std::vector<Token> &tokens) -> Status {
3005+ auto Preprocessor::continuePreprocessing (std::vector<Token> &tokens)
3006+ -> PreprocessingState {
30073007 // consume the continuation if there is one
30083008 std::function<void ()> continuation;
30093009 std::swap (continuation, d->continuation_ );
@@ -3208,24 +3208,20 @@ auto Preprocessor::resolve(const Include &include, bool isIncludeNext) const
32083208 return d->resolve (include, isIncludeNext);
32093209}
32103210
3211- void DefaultPreprocessorState::operator ()(
3212- const Preprocessor::ProcessingComplete &) {
3211+ void DefaultPreprocessorState::operator ()(const ProcessingComplete &) {
32133212 done = true ;
32143213}
32153214
3216- void DefaultPreprocessorState::operator ()(
3217- const Preprocessor::CanContinuePreprocessing &) {}
3215+ void DefaultPreprocessorState::operator ()(const CanContinuePreprocessing &) {}
32183216
3219- void DefaultPreprocessorState::operator ()(
3220- const Preprocessor::PendingInclude &status) {
3217+ void DefaultPreprocessorState::operator ()(const PendingInclude &status) {
32213218 auto resolvedInclude = self.resolve (status.include , status.isIncludeNext );
32223219
32233220 status.resolveWith (resolvedInclude);
32243221}
32253222
3226- void DefaultPreprocessorState::operator ()(
3227- const Preprocessor::PendingHasIncludes &status) {
3228- using Request = Preprocessor::PendingHasIncludes::Request;
3223+ void DefaultPreprocessorState::operator ()(const PendingHasIncludes &status) {
3224+ using Request = PendingHasIncludes::Request;
32293225
32303226 std::ranges::for_each (status.requests , [&](const Request &dep) {
32313227 auto resolved = self.resolve (dep.include , dep.isIncludeNext );
0 commit comments