From 2d728f0c56c28ac0bcc2bf156c236c21d1f27945 Mon Sep 17 00:00:00 2001 From: Taeer Bar-Yam Date: Thu, 6 Nov 2025 19:53:17 +0100 Subject: [PATCH] parser.y: get rid of most nix:: prefix --- src/libexpr/parser.y | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y index 82c7b964f..df700cab2 100644 --- a/src/libexpr/parser.y +++ b/src/libexpr/parser.y @@ -126,26 +126,26 @@ static Expr * makeCall(Exprs & exprs, PosIdx pos, Expr * fn, Expr * arg) { %define api.value.type variant -%type start expr expr_function expr_if expr_op -%type expr_select expr_simple expr_app -%type expr_pipe_from expr_pipe_into +%type start expr expr_function expr_if expr_op +%type expr_select expr_simple expr_app +%type expr_pipe_from expr_pipe_into %type > list -%type binds binds1 -%type formals formal_set -%type formal -%type > attrpath -%type >> attrs -%type >> string_parts_interpolated -%type >>> ind_string_parts -%type path_start -%type > string_parts string_attr -%type attr -%token ID -%token STR IND_STR -%token INT_LIT -%token FLOAT_LIT -%token PATH HPATH SPATH PATH_END -%token URI +%type binds binds1 +%type formals formal_set +%type formal +%type > attrpath +%type >> attrs +%type >> string_parts_interpolated +%type >>> ind_string_parts +%type path_start +%type > string_parts string_attr +%type attr +%token ID +%token STR IND_STR +%token INT_LIT +%token FLOAT_LIT +%token PATH HPATH SPATH PATH_END +%token URI %token IF THEN ELSE ASSERT WITH LET IN_KW REC INHERIT EQ NEQ AND OR IMPL OR_KW %token PIPE_FROM PIPE_INTO /* <| and |> */ %token DOLLAR_CURLY /* == ${ */ @@ -425,7 +425,7 @@ binds1 if (!$accum->inheritFromExprs) $accum->inheritFromExprs = std::make_unique>(); $accum->inheritFromExprs->push_back($expr); - auto from = new nix::ExprInheritFrom(state->at(@expr), $accum->inheritFromExprs->size() - 1); + auto from = state->exprs.add(state->at(@expr), $accum->inheritFromExprs->size() - 1); for (auto & [i, iPos] : $attrs) { if ($accum->attrs.find(i.symbol) != $accum->attrs.end()) state->dupAttr(i.symbol, iPos, $accum->attrs[i.symbol].pos);