Ben Burdette
1d43a6e123
use plain errPos instead of nixCode; fix tests
2020-06-23 15:30:13 -06:00
Eelco Dolstra
1fb762d11f
Get rid of explicit ErrorInfo constructors
2020-06-15 14:06:58 +02:00
Ben Burdette
55eb717148
add pos to errorinfo, remove from hints
2020-05-08 18:18:28 -06:00
Eelco Dolstra
9af10b753c
Bindings::get(): std::optional<Attr *> -> Attr *
...
Returning a nullable type in an optional is silly.
2020-02-13 17:15:05 +01:00
Eelco Dolstra
79142cbbe1
Bindings: Add convenience method for requiring an attribute
...
(cherry picked from commit fb692e5f7b
)
2019-12-05 20:29:15 +01:00
Eelco Dolstra
0d118ef0c9
Bindings::get(): Add convenience method
...
This allows writing attribute lookups as
if (auto name = value.attrs->get(state.sName))
...
(cherry picked from commit f216c76c56
)
2019-12-05 20:29:00 +01:00
Tuomas Tynkkynen
056d28a601
libexpr: Don't create lots of temporary strings in Bindings::lexicographicOrder
...
Avoids ~180,000 string temporaries created when evaluating a headless
NixOS system.
2018-02-19 22:47:25 +02:00
Eelco Dolstra
54801ed6ad
Bindings: Add a method for iterating in lexicographically sorted order
2017-01-26 20:40:33 +01:00
Nicolas B. Pierron
db21cfa688
Move attribute set data structures into their own header file.
...
This modification moves Attr and Bindings structures into their own header
file which is dedicated to the attribute set representation. The goal of to
isolate pieces of code which are related to the attribute set
representation. Thus future modifications of the attribute set
representation will only have to modify these files, and not every other
file across the evaluator.
2015-07-14 19:23:17 +02:00