Files
lix/tests/functional/lang/parse-okay-regression-20041027.exp
T
piegames cf57b5c14c libexpr: Remove Expr::show, add JSON expression serialization
The code for serialization Expr nodes back into (pseudo-)Nix has been
removed for being subtly error-prone and tedious to maintain. Instead,
`nix-instantiate --parse` now prints a JSON representation of the AST.

Usage patterns of the --parse flag I've found in the wild:

1. Check if a file is well-formed, i.e. discard output and test exit code
2. Get parser errors from a file, i.e. discard stdout and use stderr
3. Nixfmt uses --parse to test equivalence pre/post format, and that property is (should be?) preserved

None of these should break with the current change

Closes #487

Change-Id: Icdbaad17790f2ad8765fa08e02e6597ee4c7a909
2025-01-21 11:35:51 +01:00

37 lines
812 B
Plaintext

_type: ExprLambda
body:
_type: ExprCall
args:
- _type: ExprSet
attrs:
name:
_type: ExprString
value: libXi-6.0.1
src:
_type: ExprCall
args:
- _type: ExprSet
attrs:
md5:
_type: ExprString
value: 7e935a42428d63a387b3c048be0f2756
url:
_type: ExprString
value: http://freedesktop.org/~xlibs/release/libXi-6.0.1.tar.bz2
recursive: false
fun:
_type: ExprVar
value: fetchurl
recursive: false
fun:
_type: ExprSelect
attrs:
- mkDerivation
e:
_type: ExprVar
value: stdenv
formals:
fetchurl: null
stdenv: null
formalsEllipsis: false