Skip to content

Commit 2d728f0

Browse files
committed
parser.y: get rid of most nix:: prefix
1 parent 5ffc9fd commit 2d728f0

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

src/libexpr/parser.y

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -126,26 +126,26 @@ static Expr * makeCall(Exprs & exprs, PosIdx pos, Expr * fn, Expr * arg) {
126126

127127
%define api.value.type variant
128128

129-
%type <nix::Expr *> start expr expr_function expr_if expr_op
130-
%type <nix::Expr *> expr_select expr_simple expr_app
131-
%type <nix::Expr *> expr_pipe_from expr_pipe_into
129+
%type <Expr *> start expr expr_function expr_if expr_op
130+
%type <Expr *> expr_select expr_simple expr_app
131+
%type <Expr *> expr_pipe_from expr_pipe_into
132132
%type <std::vector<Expr *>> list
133-
%type <nix::ExprAttrs *> binds binds1
134-
%type <nix::FormalsBuilder> formals formal_set
135-
%type <nix::Formal> formal
136-
%type <std::vector<nix::AttrName>> attrpath
137-
%type <std::vector<std::pair<nix::AttrName, nix::PosIdx>>> attrs
138-
%type <std::vector<std::pair<nix::PosIdx, nix::Expr *>>> string_parts_interpolated
139-
%type <std::vector<std::pair<nix::PosIdx, std::variant<nix::Expr *, nix::StringToken>>>> ind_string_parts
140-
%type <nix::Expr *> path_start
141-
%type <std::variant<nix::Expr *, std::string_view>> string_parts string_attr
142-
%type <nix::StringToken> attr
143-
%token <nix::StringToken> ID
144-
%token <nix::StringToken> STR IND_STR
145-
%token <nix::NixInt> INT_LIT
146-
%token <nix::NixFloat> FLOAT_LIT
147-
%token <nix::StringToken> PATH HPATH SPATH PATH_END
148-
%token <nix::StringToken> URI
133+
%type <ExprAttrs *> binds binds1
134+
%type <FormalsBuilder> formals formal_set
135+
%type <Formal> formal
136+
%type <std::vector<AttrName>> attrpath
137+
%type <std::vector<std::pair<AttrName, PosIdx>>> attrs
138+
%type <std::vector<std::pair<PosIdx, Expr *>>> string_parts_interpolated
139+
%type <std::vector<std::pair<PosIdx, std::variant<Expr *, StringToken>>>> ind_string_parts
140+
%type <Expr *> path_start
141+
%type <std::variant<Expr *, std::string_view>> string_parts string_attr
142+
%type <StringToken> attr
143+
%token <StringToken> ID
144+
%token <StringToken> STR IND_STR
145+
%token <NixInt> INT_LIT
146+
%token <NixFloat> FLOAT_LIT
147+
%token <StringToken> PATH HPATH SPATH PATH_END
148+
%token <StringToken> URI
149149
%token IF THEN ELSE ASSERT WITH LET IN_KW REC INHERIT EQ NEQ AND OR IMPL OR_KW
150150
%token PIPE_FROM PIPE_INTO /* <| and |> */
151151
%token DOLLAR_CURLY /* == ${ */
@@ -425,7 +425,7 @@ binds1
425425
if (!$accum->inheritFromExprs)
426426
$accum->inheritFromExprs = std::make_unique<std::vector<Expr *>>();
427427
$accum->inheritFromExprs->push_back($expr);
428-
auto from = new nix::ExprInheritFrom(state->at(@expr), $accum->inheritFromExprs->size() - 1);
428+
auto from = state->exprs.add<ExprInheritFrom>(state->at(@expr), $accum->inheritFromExprs->size() - 1);
429429
for (auto & [i, iPos] : $attrs) {
430430
if ($accum->attrs.find(i.symbol) != $accum->attrs.end())
431431
state->dupAttr(i.symbol, iPos, $accum->attrs[i.symbol].pos);

0 commit comments

Comments
 (0)