Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43,641 changes: 22,015 additions & 21,626 deletions astgen/stdast.go

Large diffs are not rendered by default.

1,807 changes: 1,807 additions & 0 deletions stdlib/std.jsonnet

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion testdata/assert_equal4.golden
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
RUNTIME ERROR: Assertion failed. {"x": 1} != {"x": 2}
-------------------------------------------------
<std>:861:7-56 function <anonymous>
<std>:863:7-56 function <anonymous>

error 'Assertion failed. ' + astr + ' != ' + bstr,

Expand Down
2 changes: 1 addition & 1 deletion testdata/assert_equal5.golden
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
RUNTIME ERROR: Assertion failed. "\n " != "\n"
-------------------------------------------------
<std>:861:7-56 function <anonymous>
<std>:863:7-56 function <anonymous>

error 'Assertion failed. ' + astr + ' != ' + bstr,

Expand Down
2 changes: 1 addition & 1 deletion testdata/assert_equal6.golden
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
RUNTIME ERROR: Assertion failed. "\u001b[31m" != ""
-------------------------------------------------
<std>:861:7-56 function <anonymous>
<std>:863:7-56 function <anonymous>

error 'Assertion failed. ' + astr + ' != ' + bstr,

Expand Down
6 changes: 3 additions & 3 deletions testdata/percent_bad2.golden
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
RUNTIME ERROR: Too many values to format: 1, expected 0
-------------------------------------------------
<std>:727:11-86 function <format_codes_arr>
<std>:729:11-86 function <format_codes_arr>

error ('Too many values to format: ' + std.length(arr) + ', expected ' + j)

-------------------------------------------------
<std>:733:11-59 function <format_codes_arr>
<std>:735:11-59 function <format_codes_arr>

format_codes_arr(codes, arr, i + 1, j, v + code) tailstrict

-------------------------------------------------
<std>:824:7-48 function <anonymous>
<std>:826:7-48 function <anonymous>

format_codes_arr(codes, [vals], 0, 0, ''),

Expand Down
6 changes: 3 additions & 3 deletions testdata/percent_format_str4.golden
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
RUNTIME ERROR: Too many values to format: 2, expected 1
-------------------------------------------------
<std>:727:11-86 function <format_codes_arr>
<std>:729:11-86 function <format_codes_arr>

error ('Too many values to format: ' + std.length(arr) + ', expected ' + j)

-------------------------------------------------
<std>:733:11-59 function <format_codes_arr>
<std>:735:11-59 function <format_codes_arr>

format_codes_arr(codes, arr, i + 1, j, v + code) tailstrict

-------------------------------------------------
<std>:820:7-46 function <anonymous>
<std>:822:7-46 function <anonymous>

format_codes_arr(codes, vals, 0, 0, '')

Expand Down
8 changes: 4 additions & 4 deletions testdata/percent_format_str5.golden
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
RUNTIME ERROR: Not enough values to format: 1, expected more than 1
-------------------------------------------------
<std>:760:15-103 thunk <val> from <function <format_codes_arr>>
<std>:762:15-103 thunk <val> from <function <format_codes_arr>>

error ('Not enough values to format: ' + std.length(arr) + ', expected more than ' + j2);

-------------------------------------------------
<std>:765:27-30 thunk from <thunk <s> from <function <format_codes_arr>>>
<std>:767:27-30 thunk from <thunk <s> from <function <format_codes_arr>>>

format_code(val, code, tmp.fw, tmp2.prec, j2);

Expand All @@ -22,12 +22,12 @@ RUNTIME ERROR: Not enough values to format: 1, expected more than 1
-------------------------------------------------
... (skipped 10 frames)
-------------------------------------------------
<std>:776:11-64 function <format_codes_arr>
<std>:778:11-64 function <format_codes_arr>

format_codes_arr(codes, arr, i + 1, j3, v + s_padded) tailstrict;

-------------------------------------------------
<std>:820:7-46 function <anonymous>
<std>:822:7-46 function <anonymous>

format_codes_arr(codes, vals, 0, 0, '')

Expand Down
8 changes: 4 additions & 4 deletions testdata/percent_format_str6.golden
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
RUNTIME ERROR: Not enough values to format: 1, expected more than 1
-------------------------------------------------
<std>:760:15-103 thunk <val> from <function <format_codes_arr>>
<std>:762:15-103 thunk <val> from <function <format_codes_arr>>

error ('Not enough values to format: ' + std.length(arr) + ', expected more than ' + j2);

-------------------------------------------------
<std>:765:27-30 thunk from <thunk <s> from <function <format_codes_arr>>>
<std>:767:27-30 thunk from <thunk <s> from <function <format_codes_arr>>>

format_code(val, code, tmp.fw, tmp2.prec, j2);

Expand All @@ -22,12 +22,12 @@ RUNTIME ERROR: Not enough values to format: 1, expected more than 1
-------------------------------------------------
... (skipped 10 frames)
-------------------------------------------------
<std>:776:11-64 function <format_codes_arr>
<std>:778:11-64 function <format_codes_arr>

format_codes_arr(codes, arr, i + 1, j3, v + s_padded) tailstrict;

-------------------------------------------------
<std>:824:7-48 function <anonymous>
<std>:826:7-48 function <anonymous>

format_codes_arr(codes, [vals], 0, 0, ''),

Expand Down
14 changes: 7 additions & 7 deletions testdata/percent_format_str7.golden
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
RUNTIME ERROR: Format required number at 0, got string
-------------------------------------------------
<std>:(638:11)-(639:47) function <format_code>
<std>:(640:13)-(641:49) function <format_code>

error 'Format required number at '
+ i + ', got ' + std.type(val)
error 'Format required number at '
+ i + ', got ' + std.type(val)

-------------------------------------------------
<std>:765:15-60 thunk <s> from <function <format_codes_arr>>
<std>:767:15-60 thunk <s> from <function <format_codes_arr>>

format_code(val, code, tmp.fw, tmp2.prec, j2);

-------------------------------------------------
<std>:770:24-25 thunk from <thunk <s_padded> from <function <format_codes_arr>>>
<std>:772:24-25 thunk from <thunk <s_padded> from <function <format_codes_arr>>>

pad_left(s, tmp.fw, ' ');

Expand All @@ -23,12 +23,12 @@ RUNTIME ERROR: Format required number at 0, got string
-------------------------------------------------
... (skipped 7 frames)
-------------------------------------------------
<std>:776:11-64 function <format_codes_arr>
<std>:778:11-64 function <format_codes_arr>

format_codes_arr(codes, arr, i + 1, j3, v + s_padded) tailstrict;

-------------------------------------------------
<std>:820:7-46 function <anonymous>
<std>:822:7-46 function <anonymous>

format_codes_arr(codes, vals, 0, 0, '')

Expand Down