From 17de9dd2755f3ffcd90083a062e73aba4cc3ff2c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 7 Apr 2025 17:54:39 +0200 Subject: [PATCH] Make lexer-helpers.hh internal to fix a clang-tidy error (cherry picked from commit 8be24f58f2bc3ccbb85570378022673cb8b36b27) --- src/libexpr/include/nix/expr/meson.build | 1 - src/libexpr/lexer-helpers.cc | 5 +---- src/libexpr/{include/nix/expr => }/lexer-helpers.hh | 0 src/libexpr/lexer.l | 3 +-- 4 files changed, 2 insertions(+), 7 deletions(-) rename src/libexpr/{include/nix/expr => }/lexer-helpers.hh (100%) diff --git a/src/libexpr/include/nix/expr/meson.build b/src/libexpr/include/nix/expr/meson.build index 01275e52e..50ea8f3c2 100644 --- a/src/libexpr/include/nix/expr/meson.build +++ b/src/libexpr/include/nix/expr/meson.build @@ -20,7 +20,6 @@ headers = [config_pub_h] + files( 'gc-small-vector.hh', 'get-drvs.hh', 'json-to-value.hh', - # internal: 'lexer-helpers.hh', 'nixexpr.hh', 'parser-state.hh', 'primops.hh', diff --git a/src/libexpr/lexer-helpers.cc b/src/libexpr/lexer-helpers.cc index 4b27393bb..927e3cc73 100644 --- a/src/libexpr/lexer-helpers.cc +++ b/src/libexpr/lexer-helpers.cc @@ -1,7 +1,4 @@ -#include "lexer-tab.hh" -#include "parser-tab.hh" - -#include "nix/expr/lexer-helpers.hh" +#include "lexer-helpers.hh" void nix::lexer::internal::initLoc(YYLTYPE * loc) { diff --git a/src/libexpr/include/nix/expr/lexer-helpers.hh b/src/libexpr/lexer-helpers.hh similarity index 100% rename from src/libexpr/include/nix/expr/lexer-helpers.hh rename to src/libexpr/lexer-helpers.hh diff --git a/src/libexpr/lexer.l b/src/libexpr/lexer.l index 511c8e47b..1e196741d 100644 --- a/src/libexpr/lexer.l +++ b/src/libexpr/lexer.l @@ -25,8 +25,7 @@ #endif #include "nix/expr/nixexpr.hh" -#include "parser-tab.hh" -#include "nix/expr/lexer-helpers.hh" +#include "lexer-helpers.hh" namespace nix { struct LexerState;