Minor formatting tweaks
(cherry picked from commit 365b831e6f290c733da6879dae871dada343a1eb)
Change-Id: Ife3d269d2f87d6e3fe8a348995019dfc08ac75eb
This commit is contained in:
parent
0cf06c5ab5
commit
1bb8fe48a2
|
@ -1,19 +1,25 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
///@file
|
||||||
|
|
||||||
#include "eval.hh"
|
#include "eval.hh"
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
// using C a struct allows us to avoid having to define the special
|
/**
|
||||||
// members that using string_view here would implicitly delete.
|
* @note Storing a C-style `char *` and `size_t` allows us to avoid
|
||||||
struct StringToken {
|
* having to define the special members that using string_view here
|
||||||
|
* would implicitly delete.
|
||||||
|
*/
|
||||||
|
struct StringToken
|
||||||
|
{
|
||||||
const char * p;
|
const char * p;
|
||||||
size_t l;
|
size_t l;
|
||||||
bool hasIndentation;
|
bool hasIndentation;
|
||||||
operator std::string_view() const { return {p, l}; }
|
operator std::string_view() const { return {p, l}; }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ParserLocation {
|
struct ParserLocation
|
||||||
|
{
|
||||||
int first_line, first_column;
|
int first_line, first_column;
|
||||||
int last_line, last_column;
|
int last_line, last_column;
|
||||||
|
|
||||||
|
@ -36,7 +42,8 @@ struct ParserLocation {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ParserState {
|
struct ParserState
|
||||||
|
{
|
||||||
SymbolTable & symbols;
|
SymbolTable & symbols;
|
||||||
PosTable & positions;
|
PosTable & positions;
|
||||||
Expr * result;
|
Expr * result;
|
||||||
|
|
Loading…
Reference in a new issue