diff options
author | eldritch horrors <pennae@lix.systems> | 2024-03-08 05:37:58 +0100 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-03-09 00:25:54 -0700 |
commit | 1bb8fe48a28665abdd63c82371cb2031f19eb1b1 (patch) | |
tree | c167d794df37a984b05abe096e281fc82b5d9a33 | |
parent | 0cf06c5ab5ea1805061103fc53c8d3dba67bd1c1 (diff) |
Minor formatting tweaks
(cherry picked from commit 365b831e6f290c733da6879dae871dada343a1eb)
Change-Id: Ife3d269d2f87d6e3fe8a348995019dfc08ac75eb
-rw-r--r-- | src/libexpr/parser-state.hh | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/libexpr/parser-state.hh b/src/libexpr/parser-state.hh index b0fb93767..ace2a109d 100644 --- a/src/libexpr/parser-state.hh +++ b/src/libexpr/parser-state.hh @@ -1,19 +1,25 @@ #pragma once +///@file #include "eval.hh" namespace nix { -// using C a struct allows us to avoid having to define the special -// members that using string_view here would implicitly delete. -struct StringToken { - const char * p; - size_t l; - bool hasIndentation; - operator std::string_view() const { return {p, l}; } +/** + * @note Storing a C-style `char *` and `size_t` allows us to avoid + * having to define the special members that using string_view here + * would implicitly delete. + */ +struct StringToken +{ + const char * p; + size_t l; + bool hasIndentation; + operator std::string_view() const { return {p, l}; } }; -struct ParserLocation { +struct ParserLocation +{ int first_line, first_column; int last_line, last_column; @@ -36,7 +42,8 @@ struct ParserLocation { } }; -struct ParserState { +struct ParserState +{ SymbolTable & symbols; PosTable & positions; Expr * result; |