| ... | @@ -117,17 +117,18 @@ pub const Diagnostics = struct { | ... | @@ -117,17 +117,18 @@ pub const Diagnostics = struct { |
| 117 | errors: []const Error, | 117 | errors: []const Error, |
| 118 | | 118 | |
| 119 | pub fn format(self: *const @This(), w: *std.Io.Writer) std.Io.Writer.Error!void { | 119 | pub fn format(self: *const @This(), w: *std.Io.Writer) std.Io.Writer.Error!void { |
| 120 | for (self.errors) |e| { | 120 | for (self.errors, 0..) |e, i| { |
| 121 | try w.print("{s}:", .{self.path}); | 121 | if (i > 0) try w.writeByte('\n'); |
| 122 | try w.print("{d}:{d}: error: {s}\n", .{ | 122 | try w.print("{s}:{d}:{d}: error: {s}", .{ |
| | 123 | self.path, |
| 123 | e.loc.line + 1, | 124 | e.loc.line + 1, |
| 124 | e.loc.column + 1, | 125 | e.loc.column + 1, |
| 125 | e.msg, | 126 | e.msg, |
| 126 | }); | 127 | }); |
| 127 | | 128 | |
| 128 | for (e.notes) |note| { | 129 | for (e.notes) |note| { |
| 129 | try w.print("{s}:", .{self.path}); | 130 | try w.print("\n{s}:{d}:{d}: note: {s}", .{ |
| 130 | try w.print("{d}:{d}: note: {s}\n", .{ | 131 | self.path, |
| 131 | note.loc.line + 1, | 132 | note.loc.line + 1, |
| 132 | note.loc.column + 1, | 133 | note.loc.column + 1, |
| 133 | note.msg, | 134 | note.msg, |
| ... | @@ -1394,7 +1395,6 @@ test "std.zon ast errors" { | ... | @@ -1394,7 +1395,6 @@ test "std.zon ast errors" { |
| 1394 | ); | 1395 | ); |
| 1395 | try std.testing.expectFmt( | 1396 | try std.testing.expectFmt( |
| 1396 | \\input.zon:1:13: error: expected ',' after initializer | 1397 | \\input.zon:1:13: error: expected ',' after initializer |
| 1397 | \\ | | |
| 1398 | , "{f}", .{diagnostics.fmt("input.zon")}); | 1398 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 1399 | } | 1399 | } |
| 1400 | | 1400 | |
| ... | @@ -1429,7 +1429,6 @@ test "std.zon comments" { | ... | @@ -1429,7 +1429,6 @@ test "std.zon comments" { |
| 1429 | })); | 1429 | })); |
| 1430 | try std.testing.expectFmt( | 1430 | try std.testing.expectFmt( |
| 1431 | \\input.zon:1:1: error: expected expression, found 'a document comment' | 1431 | \\input.zon:1:1: error: expected expression, found 'a document comment' |
| 1432 | \\ | | |
| 1433 | , "{f}", .{diagnostics.fmt("input.zon")}); | 1432 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 1434 | } | 1433 | } |
| 1435 | } | 1434 | } |
| ... | @@ -1469,7 +1468,6 @@ test "std.zon fromSlice syntax error" { | ... | @@ -1469,7 +1468,6 @@ test "std.zon fromSlice syntax error" { |
| 1469 | ); | 1468 | ); |
| 1470 | try std.testing.expectFmt( | 1469 | try std.testing.expectFmt( |
| 1471 | \\input.zon:1:3: error: expected expression, found 'EOF' | 1470 | \\input.zon:1:3: error: expected expression, found 'EOF' |
| 1472 | \\ | | |
| 1473 | , "{f}", .{diagnostics.fmt("input.zon")}); | 1471 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 1474 | } | 1472 | } |
| 1475 | | 1473 | |
| ... | @@ -1610,7 +1608,6 @@ test "std.zon unions" { | ... | @@ -1610,7 +1608,6 @@ test "std.zon unions" { |
| 1610 | try std.testing.expectFmt( | 1608 | try std.testing.expectFmt( |
| 1611 | \\input.zon:1:4: error: unexpected field 'z' | 1609 | \\input.zon:1:4: error: unexpected field 'z' |
| 1612 | \\input.zon:1:4: note: supported: 'x', 'y' | 1610 | \\input.zon:1:4: note: supported: 'x', 'y' |
| 1613 | \\ | | |
| 1614 | , "{f}", .{diagnostics.fmt("input.zon")}); | 1611 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 1615 | } | 1612 | } |
| 1616 | | 1613 | |
| ... | @@ -1628,7 +1625,6 @@ test "std.zon unions" { | ... | @@ -1628,7 +1625,6 @@ test "std.zon unions" { |
| 1628 | ); | 1625 | ); |
| 1629 | try std.testing.expectFmt( | 1626 | try std.testing.expectFmt( |
| 1630 | \\input.zon:1:6: error: expected type 'void' | 1627 | \\input.zon:1:6: error: expected type 'void' |
| 1631 | \\ | | |
| 1632 | , "{f}", .{diagnostics.fmt("input.zon")}); | 1628 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 1633 | } | 1629 | } |
| 1634 | | 1630 | |
| ... | @@ -1646,7 +1642,6 @@ test "std.zon unions" { | ... | @@ -1646,7 +1642,6 @@ test "std.zon unions" { |
| 1646 | ); | 1642 | ); |
| 1647 | try std.testing.expectFmt( | 1643 | try std.testing.expectFmt( |
| 1648 | \\input.zon:1:2: error: expected union | 1644 | \\input.zon:1:2: error: expected union |
| 1649 | \\ | | |
| 1650 | , "{f}", .{diagnostics.fmt("input.zon")}); | 1645 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 1651 | } | 1646 | } |
| 1652 | | 1647 | |
| ... | @@ -1664,7 +1659,6 @@ test "std.zon unions" { | ... | @@ -1664,7 +1659,6 @@ test "std.zon unions" { |
| 1664 | ); | 1659 | ); |
| 1665 | try std.testing.expectFmt( | 1660 | try std.testing.expectFmt( |
| 1666 | \\input.zon:1:2: error: expected union | 1661 | \\input.zon:1:2: error: expected union |
| 1667 | \\ | | |
| 1668 | , "{f}", .{diagnostics.fmt("input.zon")}); | 1662 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 1669 | } | 1663 | } |
| 1670 | | 1664 | |
| ... | @@ -1679,7 +1673,6 @@ test "std.zon unions" { | ... | @@ -1679,7 +1673,6 @@ test "std.zon unions" { |
| 1679 | })); | 1673 | })); |
| 1680 | try std.testing.expectFmt( | 1674 | try std.testing.expectFmt( |
| 1681 | \\input.zon:1:2: error: expected union | 1675 | \\input.zon:1:2: error: expected union |
| 1682 | \\ | | |
| 1683 | , "{f}", .{diagnostics.fmt("input.zon")}); | 1676 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 1684 | } | 1677 | } |
| 1685 | | 1678 | |
| ... | @@ -1695,7 +1688,6 @@ test "std.zon unions" { | ... | @@ -1695,7 +1688,6 @@ test "std.zon unions" { |
| 1695 | try std.testing.expectFmt( | 1688 | try std.testing.expectFmt( |
| 1696 | \\input.zon:1:2: error: unexpected field 'y' | 1689 | \\input.zon:1:2: error: unexpected field 'y' |
| 1697 | \\input.zon:1:2: note: supported: 'x' | 1690 | \\input.zon:1:2: note: supported: 'x' |
| 1698 | \\ | | |
| 1699 | , "{f}", .{diagnostics.fmt("input.zon")}); | 1691 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 1700 | } | 1692 | } |
| 1701 | | 1693 | |
| ... | @@ -1710,7 +1702,6 @@ test "std.zon unions" { | ... | @@ -1710,7 +1702,6 @@ test "std.zon unions" { |
| 1710 | })); | 1702 | })); |
| 1711 | try std.testing.expectFmt( | 1703 | try std.testing.expectFmt( |
| 1712 | \\input.zon:1:2: error: expected union | 1704 | \\input.zon:1:2: error: expected union |
| 1713 | \\ | | |
| 1714 | , "{f}", .{diagnostics.fmt("input.zon")}); | 1705 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 1715 | } | 1706 | } |
| 1716 | } | 1707 | } |
| ... | @@ -1790,7 +1781,6 @@ test "std.zon structs" { | ... | @@ -1790,7 +1781,6 @@ test "std.zon structs" { |
| 1790 | try std.testing.expectFmt( | 1781 | try std.testing.expectFmt( |
| 1791 | \\input.zon:1:12: error: unexpected field 'z' | 1782 | \\input.zon:1:12: error: unexpected field 'z' |
| 1792 | \\input.zon:1:12: note: supported: 'x', 'y' | 1783 | \\input.zon:1:12: note: supported: 'x', 'y' |
| 1793 | \\ | | |
| 1794 | , "{f}", .{diagnostics.fmt("input.zon")}); | 1784 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 1795 | } | 1785 | } |
| 1796 | | 1786 | |
| ... | @@ -1809,7 +1799,6 @@ test "std.zon structs" { | ... | @@ -1809,7 +1799,6 @@ test "std.zon structs" { |
| 1809 | try std.testing.expectFmt( | 1799 | try std.testing.expectFmt( |
| 1810 | \\input.zon:1:4: error: duplicate struct field name | 1800 | \\input.zon:1:4: error: duplicate struct field name |
| 1811 | \\input.zon:1:12: note: duplicate name here | 1801 | \\input.zon:1:12: note: duplicate name here |
| 1812 | \\ | | |
| 1813 | , "{f}", .{diagnostics.fmt("input.zon")}); | 1802 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 1814 | } | 1803 | } |
| 1815 | | 1804 | |
| ... | @@ -1841,7 +1830,6 @@ test "std.zon structs" { | ... | @@ -1841,7 +1830,6 @@ test "std.zon structs" { |
| 1841 | try std.testing.expectFmt( | 1830 | try std.testing.expectFmt( |
| 1842 | \\input.zon:1:4: error: unexpected field 'x' | 1831 | \\input.zon:1:4: error: unexpected field 'x' |
| 1843 | \\input.zon:1:4: note: none expected | 1832 | \\input.zon:1:4: note: none expected |
| 1844 | \\ | | |
| 1845 | , "{f}", .{diagnostics.fmt("input.zon")}); | 1833 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 1846 | } | 1834 | } |
| 1847 | | 1835 | |
| ... | @@ -1859,7 +1847,6 @@ test "std.zon structs" { | ... | @@ -1859,7 +1847,6 @@ test "std.zon structs" { |
| 1859 | ); | 1847 | ); |
| 1860 | try std.testing.expectFmt( | 1848 | try std.testing.expectFmt( |
| 1861 | \\input.zon:1:2: error: missing required field y | 1849 | \\input.zon:1:2: error: missing required field y |
| 1862 | \\ | | |
| 1863 | , "{f}", .{diagnostics.fmt("input.zon")}); | 1850 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 1864 | } | 1851 | } |
| 1865 | | 1852 | |
| ... | @@ -1899,7 +1886,6 @@ test "std.zon structs" { | ... | @@ -1899,7 +1886,6 @@ test "std.zon structs" { |
| 1899 | try std.testing.expectError(error.ParseZon, parsed); | 1886 | try std.testing.expectError(error.ParseZon, parsed); |
| 1900 | try std.testing.expectFmt( | 1887 | try std.testing.expectFmt( |
| 1901 | \\input.zon:1:18: error: cannot initialize comptime field | 1888 | \\input.zon:1:18: error: cannot initialize comptime field |
| 1902 | \\ | | |
| 1903 | , "{f}", .{diagnostics.fmt("input.zon")}); | 1889 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 1904 | } | 1890 | } |
| 1905 | | 1891 | |
| ... | @@ -1942,7 +1928,6 @@ test "std.zon structs" { | ... | @@ -1942,7 +1928,6 @@ test "std.zon structs" { |
| 1942 | try std.testing.expectFmt( | 1928 | try std.testing.expectFmt( |
| 1943 | \\input.zon:1:1: error: types are not available in ZON | 1929 | \\input.zon:1:1: error: types are not available in ZON |
| 1944 | \\input.zon:1:1: note: replace the type with '.' | 1930 | \\input.zon:1:1: note: replace the type with '.' |
| 1945 | \\ | | |
| 1946 | , "{f}", .{diagnostics.fmt("input.zon")}); | 1931 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 1947 | } | 1932 | } |
| 1948 | | 1933 | |
| ... | @@ -1958,7 +1943,6 @@ test "std.zon structs" { | ... | @@ -1958,7 +1943,6 @@ test "std.zon structs" { |
| 1958 | try std.testing.expectFmt( | 1943 | try std.testing.expectFmt( |
| 1959 | \\input.zon:1:1: error: types are not available in ZON | 1944 | \\input.zon:1:1: error: types are not available in ZON |
| 1960 | \\input.zon:1:1: note: replace the type with '.' | 1945 | \\input.zon:1:1: note: replace the type with '.' |
| 1961 | \\ | | |
| 1962 | , "{f}", .{diagnostics.fmt("input.zon")}); | 1946 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 1963 | } | 1947 | } |
| 1964 | | 1948 | |
| ... | @@ -1974,7 +1958,6 @@ test "std.zon structs" { | ... | @@ -1974,7 +1958,6 @@ test "std.zon structs" { |
| 1974 | try std.testing.expectFmt( | 1958 | try std.testing.expectFmt( |
| 1975 | \\input.zon:1:1: error: types are not available in ZON | 1959 | \\input.zon:1:1: error: types are not available in ZON |
| 1976 | \\input.zon:1:1: note: replace the type with '.' | 1960 | \\input.zon:1:1: note: replace the type with '.' |
| 1977 | \\ | | |
| 1978 | , "{f}", .{diagnostics.fmt("input.zon")}); | 1961 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 1979 | } | 1962 | } |
| 1980 | | 1963 | |
| ... | @@ -1990,7 +1973,6 @@ test "std.zon structs" { | ... | @@ -1990,7 +1973,6 @@ test "std.zon structs" { |
| 1990 | try std.testing.expectFmt( | 1973 | try std.testing.expectFmt( |
| 1991 | \\input.zon:1:1: error: types are not available in ZON | 1974 | \\input.zon:1:1: error: types are not available in ZON |
| 1992 | \\input.zon:1:1: note: replace the type with '.' | 1975 | \\input.zon:1:1: note: replace the type with '.' |
| 1993 | \\ | | |
| 1994 | , "{f}", .{diagnostics.fmt("input.zon")}); | 1976 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 1995 | } | 1977 | } |
| 1996 | | 1978 | |
| ... | @@ -2006,7 +1988,6 @@ test "std.zon structs" { | ... | @@ -2006,7 +1988,6 @@ test "std.zon structs" { |
| 2006 | try std.testing.expectFmt( | 1988 | try std.testing.expectFmt( |
| 2007 | \\input.zon:1:9: error: types are not available in ZON | 1989 | \\input.zon:1:9: error: types are not available in ZON |
| 2008 | \\input.zon:1:9: note: replace the type with '.' | 1990 | \\input.zon:1:9: note: replace the type with '.' |
| 2009 | \\ | | |
| 2010 | , "{f}", .{diagnostics.fmt("input.zon")}); | 1991 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2011 | } | 1992 | } |
| 2012 | } | 1993 | } |
| ... | @@ -2085,7 +2066,6 @@ test "std.zon tuples" { | ... | @@ -2085,7 +2066,6 @@ test "std.zon tuples" { |
| 2085 | ); | 2066 | ); |
| 2086 | try std.testing.expectFmt( | 2067 | try std.testing.expectFmt( |
| 2087 | \\input.zon:1:14: error: index 2 outside of tuple length 2 | 2068 | \\input.zon:1:14: error: index 2 outside of tuple length 2 |
| 2088 | \\ | | |
| 2089 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2069 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2090 | } | 2070 | } |
| 2091 | | 2071 | |
| ... | @@ -2103,7 +2083,6 @@ test "std.zon tuples" { | ... | @@ -2103,7 +2083,6 @@ test "std.zon tuples" { |
| 2103 | ); | 2083 | ); |
| 2104 | try std.testing.expectFmt( | 2084 | try std.testing.expectFmt( |
| 2105 | \\input.zon:1:2: error: missing tuple field with index 1 | 2085 | \\input.zon:1:2: error: missing tuple field with index 1 |
| 2106 | \\ | | |
| 2107 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2086 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2108 | } | 2087 | } |
| 2109 | | 2088 | |
| ... | @@ -2121,7 +2100,6 @@ test "std.zon tuples" { | ... | @@ -2121,7 +2100,6 @@ test "std.zon tuples" { |
| 2121 | ); | 2100 | ); |
| 2122 | try std.testing.expectFmt( | 2101 | try std.testing.expectFmt( |
| 2123 | \\input.zon:1:2: error: expected tuple | 2102 | \\input.zon:1:2: error: expected tuple |
| 2124 | \\ | | |
| 2125 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2103 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2126 | } | 2104 | } |
| 2127 | | 2105 | |
| ... | @@ -2139,7 +2117,6 @@ test "std.zon tuples" { | ... | @@ -2139,7 +2117,6 @@ test "std.zon tuples" { |
| 2139 | ); | 2117 | ); |
| 2140 | try std.testing.expectFmt( | 2118 | try std.testing.expectFmt( |
| 2141 | \\input.zon:1:2: error: expected struct | 2119 | \\input.zon:1:2: error: expected struct |
| 2142 | \\ | | |
| 2143 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2120 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2144 | } | 2121 | } |
| 2145 | | 2122 | |
| ... | @@ -2167,7 +2144,6 @@ test "std.zon tuples" { | ... | @@ -2167,7 +2144,6 @@ test "std.zon tuples" { |
| 2167 | try std.testing.expectError(error.ParseZon, parsed); | 2144 | try std.testing.expectError(error.ParseZon, parsed); |
| 2168 | try std.testing.expectFmt( | 2145 | try std.testing.expectFmt( |
| 2169 | \\input.zon:1:9: error: cannot initialize comptime field | 2146 | \\input.zon:1:9: error: cannot initialize comptime field |
| 2170 | \\ | | |
| 2171 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2147 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2172 | } | 2148 | } |
| 2173 | } | 2149 | } |
| ... | @@ -2356,7 +2332,6 @@ test "std.zon arrays and slices" { | ... | @@ -2356,7 +2332,6 @@ test "std.zon arrays and slices" { |
| 2356 | ); | 2332 | ); |
| 2357 | try std.testing.expectFmt( | 2333 | try std.testing.expectFmt( |
| 2358 | \\input.zon:1:3: error: index 0 outside of array of length 0 | 2334 | \\input.zon:1:3: error: index 0 outside of array of length 0 |
| 2359 | \\ | | |
| 2360 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2335 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2361 | } | 2336 | } |
| 2362 | | 2337 | |
| ... | @@ -2373,7 +2348,6 @@ test "std.zon arrays and slices" { | ... | @@ -2373,7 +2348,6 @@ test "std.zon arrays and slices" { |
| 2373 | ); | 2348 | ); |
| 2374 | try std.testing.expectFmt( | 2349 | try std.testing.expectFmt( |
| 2375 | \\input.zon:1:8: error: index 1 outside of array of length 1 | 2350 | \\input.zon:1:8: error: index 1 outside of array of length 1 |
| 2376 | \\ | | |
| 2377 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2351 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2378 | } | 2352 | } |
| 2379 | | 2353 | |
| ... | @@ -2390,7 +2364,6 @@ test "std.zon arrays and slices" { | ... | @@ -2390,7 +2364,6 @@ test "std.zon arrays and slices" { |
| 2390 | ); | 2364 | ); |
| 2391 | try std.testing.expectFmt( | 2365 | try std.testing.expectFmt( |
| 2392 | \\input.zon:1:2: error: expected 2 array elements; found 1 | 2366 | \\input.zon:1:2: error: expected 2 array elements; found 1 |
| 2393 | \\ | | |
| 2394 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2367 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2395 | } | 2368 | } |
| 2396 | | 2369 | |
| ... | @@ -2407,7 +2380,6 @@ test "std.zon arrays and slices" { | ... | @@ -2407,7 +2380,6 @@ test "std.zon arrays and slices" { |
| 2407 | ); | 2380 | ); |
| 2408 | try std.testing.expectFmt( | 2381 | try std.testing.expectFmt( |
| 2409 | \\input.zon:1:2: error: expected 3 array elements; found 0 | 2382 | \\input.zon:1:2: error: expected 3 array elements; found 0 |
| 2410 | \\ | | |
| 2411 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2383 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2412 | } | 2384 | } |
| 2413 | | 2385 | |
| ... | @@ -2426,7 +2398,6 @@ test "std.zon arrays and slices" { | ... | @@ -2426,7 +2398,6 @@ test "std.zon arrays and slices" { |
| 2426 | ); | 2398 | ); |
| 2427 | try std.testing.expectFmt( | 2399 | try std.testing.expectFmt( |
| 2428 | \\input.zon:1:3: error: expected type 'bool' | 2400 | \\input.zon:1:3: error: expected type 'bool' |
| 2429 | \\ | | |
| 2430 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2401 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2431 | } | 2402 | } |
| 2432 | | 2403 | |
| ... | @@ -2443,7 +2414,6 @@ test "std.zon arrays and slices" { | ... | @@ -2443,7 +2414,6 @@ test "std.zon arrays and slices" { |
| 2443 | ); | 2414 | ); |
| 2444 | try std.testing.expectFmt( | 2415 | try std.testing.expectFmt( |
| 2445 | \\input.zon:1:3: error: expected type 'bool' | 2416 | \\input.zon:1:3: error: expected type 'bool' |
| 2446 | \\ | | |
| 2447 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2417 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2448 | } | 2418 | } |
| 2449 | } | 2419 | } |
| ... | @@ -2463,7 +2433,6 @@ test "std.zon arrays and slices" { | ... | @@ -2463,7 +2433,6 @@ test "std.zon arrays and slices" { |
| 2463 | ); | 2433 | ); |
| 2464 | try std.testing.expectFmt( | 2434 | try std.testing.expectFmt( |
| 2465 | \\input.zon:1:1: error: expected array | 2435 | \\input.zon:1:1: error: expected array |
| 2466 | \\ | | |
| 2467 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2436 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2468 | } | 2437 | } |
| 2469 | | 2438 | |
| ... | @@ -2475,7 +2444,6 @@ test "std.zon arrays and slices" { | ... | @@ -2475,7 +2444,6 @@ test "std.zon arrays and slices" { |
| 2475 | ); | 2444 | ); |
| 2476 | try std.testing.expectFmt( | 2445 | try std.testing.expectFmt( |
| 2477 | \\input.zon:1:1: error: expected array | 2446 | \\input.zon:1:1: error: expected array |
| 2478 | \\ | | |
| 2479 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2447 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2480 | } | 2448 | } |
| 2481 | } | 2449 | } |
| ... | @@ -2488,7 +2456,6 @@ test "std.zon arrays and slices" { | ... | @@ -2488,7 +2456,6 @@ test "std.zon arrays and slices" { |
| 2488 | ); | 2456 | ); |
| 2489 | try std.testing.expectFmt( | 2457 | try std.testing.expectFmt( |
| 2490 | \\input.zon:1:3: error: pointers are not available in ZON | 2458 | \\input.zon:1:3: error: pointers are not available in ZON |
| 2491 | \\ | | |
| 2492 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2459 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2493 | } | 2460 | } |
| 2494 | } | 2461 | } |
| ... | @@ -2542,7 +2509,6 @@ test "std.zon string literal" { | ... | @@ -2542,7 +2509,6 @@ test "std.zon string literal" { |
| 2542 | ); | 2509 | ); |
| 2543 | try std.testing.expectFmt( | 2510 | try std.testing.expectFmt( |
| 2544 | \\input.zon:1:1: error: expected array | 2511 | \\input.zon:1:1: error: expected array |
| 2545 | \\ | | |
| 2546 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2512 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2547 | } | 2513 | } |
| 2548 | | 2514 | |
| ... | @@ -2553,7 +2519,6 @@ test "std.zon string literal" { | ... | @@ -2553,7 +2519,6 @@ test "std.zon string literal" { |
| 2553 | ); | 2519 | ); |
| 2554 | try std.testing.expectFmt( | 2520 | try std.testing.expectFmt( |
| 2555 | \\input.zon:1:1: error: expected array | 2521 | \\input.zon:1:1: error: expected array |
| 2556 | \\ | | |
| 2557 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2522 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2558 | } | 2523 | } |
| 2559 | } | 2524 | } |
| ... | @@ -2576,7 +2541,6 @@ test "std.zon string literal" { | ... | @@ -2576,7 +2541,6 @@ test "std.zon string literal" { |
| 2576 | ); | 2541 | ); |
| 2577 | try std.testing.expectFmt( | 2542 | try std.testing.expectFmt( |
| 2578 | \\input.zon:1:1: error: expected array | 2543 | \\input.zon:1:1: error: expected array |
| 2579 | \\ | | |
| 2580 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2544 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2581 | } | 2545 | } |
| 2582 | | 2546 | |
| ... | @@ -2592,7 +2556,6 @@ test "std.zon string literal" { | ... | @@ -2592,7 +2556,6 @@ test "std.zon string literal" { |
| 2592 | ); | 2556 | ); |
| 2593 | try std.testing.expectFmt( | 2557 | try std.testing.expectFmt( |
| 2594 | \\input.zon:1:1: error: expected array | 2558 | \\input.zon:1:1: error: expected array |
| 2595 | \\ | | |
| 2596 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2559 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2597 | } | 2560 | } |
| 2598 | } | 2561 | } |
| ... | @@ -2631,7 +2594,6 @@ test "std.zon string literal" { | ... | @@ -2631,7 +2594,6 @@ test "std.zon string literal" { |
| 2631 | ); | 2594 | ); |
| 2632 | try std.testing.expectFmt( | 2595 | try std.testing.expectFmt( |
| 2633 | \\input.zon:1:1: error: expected array | 2596 | \\input.zon:1:1: error: expected array |
| 2634 | \\ | | |
| 2635 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2597 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2636 | } | 2598 | } |
| 2637 | | 2599 | |
| ... | @@ -2642,7 +2604,6 @@ test "std.zon string literal" { | ... | @@ -2642,7 +2604,6 @@ test "std.zon string literal" { |
| 2642 | ); | 2604 | ); |
| 2643 | try std.testing.expectFmt( | 2605 | try std.testing.expectFmt( |
| 2644 | \\input.zon:1:1: error: expected array | 2606 | \\input.zon:1:1: error: expected array |
| 2645 | \\ | | |
| 2646 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2607 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2647 | } | 2608 | } |
| 2648 | } | 2609 | } |
| ... | @@ -2655,7 +2616,6 @@ test "std.zon string literal" { | ... | @@ -2655,7 +2616,6 @@ test "std.zon string literal" { |
| 2655 | ); | 2616 | ); |
| 2656 | try std.testing.expectFmt( | 2617 | try std.testing.expectFmt( |
| 2657 | \\input.zon:1:1: error: expected string | 2618 | \\input.zon:1:1: error: expected string |
| 2658 | \\ | | |
| 2659 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2619 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2660 | } | 2620 | } |
| 2661 | | 2621 | |
| ... | @@ -2667,7 +2627,6 @@ test "std.zon string literal" { | ... | @@ -2667,7 +2627,6 @@ test "std.zon string literal" { |
| 2667 | ); | 2627 | ); |
| 2668 | try std.testing.expectFmt( | 2628 | try std.testing.expectFmt( |
| 2669 | \\input.zon:1:3: error: expected type 'u8' | 2629 | \\input.zon:1:3: error: expected type 'u8' |
| 2670 | \\ | | |
| 2671 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2630 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2672 | } | 2631 | } |
| 2673 | | 2632 | |
| ... | @@ -2679,7 +2638,6 @@ test "std.zon string literal" { | ... | @@ -2679,7 +2638,6 @@ test "std.zon string literal" { |
| 2679 | ); | 2638 | ); |
| 2680 | try std.testing.expectFmt( | 2639 | try std.testing.expectFmt( |
| 2681 | \\input.zon:1:3: error: invalid escape character: 'a' | 2640 | \\input.zon:1:3: error: invalid escape character: 'a' |
| 2682 | \\ | | |
| 2683 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2641 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2684 | } | 2642 | } |
| 2685 | | 2643 | |
| ... | @@ -2692,7 +2650,6 @@ test "std.zon string literal" { | ... | @@ -2692,7 +2650,6 @@ test "std.zon string literal" { |
| 2692 | ); | 2650 | ); |
| 2693 | try std.testing.expectFmt( | 2651 | try std.testing.expectFmt( |
| 2694 | \\input.zon:1:1: error: expected array | 2652 | \\input.zon:1:1: error: expected array |
| 2695 | \\ | | |
| 2696 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2653 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2697 | } | 2654 | } |
| 2698 | | 2655 | |
| ... | @@ -2703,7 +2660,6 @@ test "std.zon string literal" { | ... | @@ -2703,7 +2660,6 @@ test "std.zon string literal" { |
| 2703 | ); | 2660 | ); |
| 2704 | try std.testing.expectFmt( | 2661 | try std.testing.expectFmt( |
| 2705 | \\input.zon:1:1: error: expected array | 2662 | \\input.zon:1:1: error: expected array |
| 2706 | \\ | | |
| 2707 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2663 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2708 | } | 2664 | } |
| 2709 | } | 2665 | } |
| ... | @@ -2722,7 +2678,6 @@ test "std.zon string literal" { | ... | @@ -2722,7 +2678,6 @@ test "std.zon string literal" { |
| 2722 | ); | 2678 | ); |
| 2723 | try std.testing.expectFmt( | 2679 | try std.testing.expectFmt( |
| 2724 | \\input.zon:1:1: error: expected array | 2680 | \\input.zon:1:1: error: expected array |
| 2725 | \\ | | |
| 2726 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2681 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2727 | } | 2682 | } |
| 2728 | | 2683 | |
| ... | @@ -2738,7 +2693,6 @@ test "std.zon string literal" { | ... | @@ -2738,7 +2693,6 @@ test "std.zon string literal" { |
| 2738 | ); | 2693 | ); |
| 2739 | try std.testing.expectFmt( | 2694 | try std.testing.expectFmt( |
| 2740 | \\input.zon:1:1: error: expected array | 2695 | \\input.zon:1:1: error: expected array |
| 2741 | \\ | | |
| 2742 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2696 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2743 | } | 2697 | } |
| 2744 | } | 2698 | } |
| ... | @@ -2842,7 +2796,6 @@ test "std.zon enum literals" { | ... | @@ -2842,7 +2796,6 @@ test "std.zon enum literals" { |
| 2842 | try std.testing.expectFmt( | 2796 | try std.testing.expectFmt( |
| 2843 | \\input.zon:1:2: error: unexpected enum literal 'qux' | 2797 | \\input.zon:1:2: error: unexpected enum literal 'qux' |
| 2844 | \\input.zon:1:2: note: supported: 'foo', 'bar', 'baz', '@"ab\nc"' | 2798 | \\input.zon:1:2: note: supported: 'foo', 'bar', 'baz', '@"ab\nc"' |
| 2845 | \\ | | |
| 2846 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2799 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2847 | } | 2800 | } |
| 2848 | | 2801 | |
| ... | @@ -2860,7 +2813,6 @@ test "std.zon enum literals" { | ... | @@ -2860,7 +2813,6 @@ test "std.zon enum literals" { |
| 2860 | try std.testing.expectFmt( | 2813 | try std.testing.expectFmt( |
| 2861 | \\input.zon:1:2: error: unexpected enum literal 'foobarbaz' | 2814 | \\input.zon:1:2: error: unexpected enum literal 'foobarbaz' |
| 2862 | \\input.zon:1:2: note: supported: 'foo', 'bar', 'baz', '@"ab\nc"' | 2815 | \\input.zon:1:2: note: supported: 'foo', 'bar', 'baz', '@"ab\nc"' |
| 2863 | \\ | | |
| 2864 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2816 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2865 | } | 2817 | } |
| 2866 | | 2818 | |
| ... | @@ -2877,7 +2829,6 @@ test "std.zon enum literals" { | ... | @@ -2877,7 +2829,6 @@ test "std.zon enum literals" { |
| 2877 | ); | 2829 | ); |
| 2878 | try std.testing.expectFmt( | 2830 | try std.testing.expectFmt( |
| 2879 | \\input.zon:1:1: error: expected enum literal | 2831 | \\input.zon:1:1: error: expected enum literal |
| 2880 | \\ | | |
| 2881 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2832 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2882 | } | 2833 | } |
| 2883 | | 2834 | |
| ... | @@ -2894,7 +2845,6 @@ test "std.zon enum literals" { | ... | @@ -2894,7 +2845,6 @@ test "std.zon enum literals" { |
| 2894 | ); | 2845 | ); |
| 2895 | try std.testing.expectFmt( | 2846 | try std.testing.expectFmt( |
| 2896 | \\input.zon:1:2: error: identifier cannot contain null bytes | 2847 | \\input.zon:1:2: error: identifier cannot contain null bytes |
| 2897 | \\ | | |
| 2898 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2848 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2899 | } | 2849 | } |
| 2900 | } | 2850 | } |
| ... | @@ -2935,7 +2885,6 @@ test "std.zon parse bool" { | ... | @@ -2935,7 +2885,6 @@ test "std.zon parse bool" { |
| 2935 | \\input.zon:1:2: error: invalid expression | 2885 | \\input.zon:1:2: error: invalid expression |
| 2936 | \\input.zon:1:2: note: ZON allows identifiers 'true', 'false', 'null', 'inf', and 'nan' | 2886 | \\input.zon:1:2: note: ZON allows identifiers 'true', 'false', 'null', 'inf', and 'nan' |
| 2937 | \\input.zon:1:2: note: precede identifier with '.' for an enum literal | 2887 | \\input.zon:1:2: note: precede identifier with '.' for an enum literal |
| 2938 | \\ | | |
| 2939 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2888 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2940 | } | 2889 | } |
| 2941 | { | 2890 | { |
| ... | @@ -2947,7 +2896,6 @@ test "std.zon parse bool" { | ... | @@ -2947,7 +2896,6 @@ test "std.zon parse bool" { |
| 2947 | })); | 2896 | })); |
| 2948 | try std.testing.expectFmt( | 2897 | try std.testing.expectFmt( |
| 2949 | \\input.zon:1:1: error: expected type 'bool' | 2898 | \\input.zon:1:1: error: expected type 'bool' |
| 2950 | \\ | | |
| 2951 | , "{f}", .{diagnostics.fmt("input.zon")}); | 2899 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 2952 | } | 2900 | } |
| 2953 | } | 2901 | } |
| ... | @@ -3092,7 +3040,6 @@ test "std.zon parse int" { | ... | @@ -3092,7 +3040,6 @@ test "std.zon parse int" { |
| 3092 | })); | 3040 | })); |
| 3093 | try std.testing.expectFmt( | 3041 | try std.testing.expectFmt( |
| 3094 | \\input.zon:1:1: error: type 'i66' cannot represent value | 3042 | \\input.zon:1:1: error: type 'i66' cannot represent value |
| 3095 | \\ | | |
| 3096 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3043 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 3097 | } | 3044 | } |
| 3098 | { | 3045 | { |
| ... | @@ -3104,7 +3051,6 @@ test "std.zon parse int" { | ... | @@ -3104,7 +3051,6 @@ test "std.zon parse int" { |
| 3104 | })); | 3051 | })); |
| 3105 | try std.testing.expectFmt( | 3052 | try std.testing.expectFmt( |
| 3106 | \\input.zon:1:1: error: type 'i66' cannot represent value | 3053 | \\input.zon:1:1: error: type 'i66' cannot represent value |
| 3107 | \\ | | |
| 3108 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3054 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 3109 | } | 3055 | } |
| 3110 | | 3056 | |
| ... | @@ -3226,7 +3172,6 @@ test "std.zon parse int" { | ... | @@ -3226,7 +3172,6 @@ test "std.zon parse int" { |
| 3226 | })); | 3172 | })); |
| 3227 | try std.testing.expectFmt( | 3173 | try std.testing.expectFmt( |
| 3228 | \\input.zon:1:3: error: invalid digit 'a' for decimal base | 3174 | \\input.zon:1:3: error: invalid digit 'a' for decimal base |
| 3229 | \\ | | |
| 3230 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3175 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 3231 | } | 3176 | } |
| 3232 | | 3177 | |
| ... | @@ -3240,7 +3185,6 @@ test "std.zon parse int" { | ... | @@ -3240,7 +3185,6 @@ test "std.zon parse int" { |
| 3240 | })); | 3185 | })); |
| 3241 | try std.testing.expectFmt( | 3186 | try std.testing.expectFmt( |
| 3242 | \\input.zon:1:1: error: expected type 'u8' | 3187 | \\input.zon:1:1: error: expected type 'u8' |
| 3243 | \\ | | |
| 3244 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3188 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 3245 | } | 3189 | } |
| 3246 | | 3190 | |
| ... | @@ -3254,7 +3198,6 @@ test "std.zon parse int" { | ... | @@ -3254,7 +3198,6 @@ test "std.zon parse int" { |
| 3254 | })); | 3198 | })); |
| 3255 | try std.testing.expectFmt( | 3199 | try std.testing.expectFmt( |
| 3256 | \\input.zon:1:1: error: type 'u8' cannot represent value | 3200 | \\input.zon:1:1: error: type 'u8' cannot represent value |
| 3257 | \\ | | |
| 3258 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3201 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 3259 | } | 3202 | } |
| 3260 | | 3203 | |
| ... | @@ -3268,7 +3211,6 @@ test "std.zon parse int" { | ... | @@ -3268,7 +3211,6 @@ test "std.zon parse int" { |
| 3268 | })); | 3211 | })); |
| 3269 | try std.testing.expectFmt( | 3212 | try std.testing.expectFmt( |
| 3270 | \\input.zon:1:1: error: type 'i8' cannot represent value | 3213 | \\input.zon:1:1: error: type 'i8' cannot represent value |
| 3271 | \\ | | |
| 3272 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3214 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 3273 | } | 3215 | } |
| 3274 | | 3216 | |
| ... | @@ -3282,7 +3224,6 @@ test "std.zon parse int" { | ... | @@ -3282,7 +3224,6 @@ test "std.zon parse int" { |
| 3282 | })); | 3224 | })); |
| 3283 | try std.testing.expectFmt( | 3225 | try std.testing.expectFmt( |
| 3284 | \\input.zon:1:1: error: type 'u8' cannot represent value | 3226 | \\input.zon:1:1: error: type 'u8' cannot represent value |
| 3285 | \\ | | |
| 3286 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3227 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 3287 | } | 3228 | } |
| 3288 | | 3229 | |
| ... | @@ -3296,7 +3237,6 @@ test "std.zon parse int" { | ... | @@ -3296,7 +3237,6 @@ test "std.zon parse int" { |
| 3296 | })); | 3237 | })); |
| 3297 | try std.testing.expectFmt( | 3238 | try std.testing.expectFmt( |
| 3298 | \\input.zon:1:1: error: type 'u8' cannot represent value | 3239 | \\input.zon:1:1: error: type 'u8' cannot represent value |
| 3299 | \\ | | |
| 3300 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3240 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 3301 | } | 3241 | } |
| 3302 | | 3242 | |
| ... | @@ -3310,7 +3250,6 @@ test "std.zon parse int" { | ... | @@ -3310,7 +3250,6 @@ test "std.zon parse int" { |
| 3310 | })); | 3250 | })); |
| 3311 | try std.testing.expectFmt( | 3251 | try std.testing.expectFmt( |
| 3312 | \\input.zon:1:1: error: type 'u8' cannot represent value | 3252 | \\input.zon:1:1: error: type 'u8' cannot represent value |
| 3313 | \\ | | |
| 3314 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3253 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 3315 | } | 3254 | } |
| 3316 | | 3255 | |
| ... | @@ -3326,7 +3265,6 @@ test "std.zon parse int" { | ... | @@ -3326,7 +3265,6 @@ test "std.zon parse int" { |
| 3326 | \\input.zon:1:2: error: integer literal '-0' is ambiguous | 3265 | \\input.zon:1:2: error: integer literal '-0' is ambiguous |
| 3327 | \\input.zon:1:2: note: use '0' for an integer zero | 3266 | \\input.zon:1:2: note: use '0' for an integer zero |
| 3328 | \\input.zon:1:2: note: use '-0.0' for a floating-point signed zero | 3267 | \\input.zon:1:2: note: use '-0.0' for a floating-point signed zero |
| 3329 | \\ | | |
| 3330 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3268 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 3331 | } | 3269 | } |
| 3332 | | 3270 | |
| ... | @@ -3342,7 +3280,6 @@ test "std.zon parse int" { | ... | @@ -3342,7 +3280,6 @@ test "std.zon parse int" { |
| 3342 | \\input.zon:1:2: error: integer literal '-0' is ambiguous | 3280 | \\input.zon:1:2: error: integer literal '-0' is ambiguous |
| 3343 | \\input.zon:1:2: note: use '0' for an integer zero | 3281 | \\input.zon:1:2: note: use '0' for an integer zero |
| 3344 | \\input.zon:1:2: note: use '-0.0' for a floating-point signed zero | 3282 | \\input.zon:1:2: note: use '-0.0' for a floating-point signed zero |
| 3345 | \\ | | |
| 3346 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3283 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 3347 | } | 3284 | } |
| 3348 | | 3285 | |
| ... | @@ -3372,7 +3309,6 @@ test "std.zon parse int" { | ... | @@ -3372,7 +3309,6 @@ test "std.zon parse int" { |
| 3372 | })); | 3309 | })); |
| 3373 | try std.testing.expectFmt( | 3310 | try std.testing.expectFmt( |
| 3374 | \\input.zon:1:1: error: expected number or 'inf' after '-' | 3311 | \\input.zon:1:1: error: expected number or 'inf' after '-' |
| 3375 | \\ | | |
| 3376 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3312 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 3377 | } | 3313 | } |
| 3378 | | 3314 | |
| ... | @@ -3388,7 +3324,6 @@ test "std.zon parse int" { | ... | @@ -3388,7 +3324,6 @@ test "std.zon parse int" { |
| 3388 | ); | 3324 | ); |
| 3389 | try std.testing.expectFmt( | 3325 | try std.testing.expectFmt( |
| 3390 | \\input.zon:1:1: error: expected number or 'inf' after '-' | 3326 | \\input.zon:1:1: error: expected number or 'inf' after '-' |
| 3391 | \\ | | |
| 3392 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3327 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 3393 | } | 3328 | } |
| 3394 | | 3329 | |
| ... | @@ -3402,7 +3337,6 @@ test "std.zon parse int" { | ... | @@ -3402,7 +3337,6 @@ test "std.zon parse int" { |
| 3402 | })); | 3337 | })); |
| 3403 | try std.testing.expectFmt( | 3338 | try std.testing.expectFmt( |
| 3404 | \\input.zon:1:3: error: invalid digit 'g' for hex base | 3339 | \\input.zon:1:3: error: invalid digit 'g' for hex base |
| 3405 | \\ | | |
| 3406 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3340 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 3407 | } | 3341 | } |
| 3408 | | 3342 | |
| ... | @@ -3417,7 +3351,6 @@ test "std.zon parse int" { | ... | @@ -3417,7 +3351,6 @@ test "std.zon parse int" { |
| 3417 | try std.testing.expectFmt( | 3351 | try std.testing.expectFmt( |
| 3418 | \\input.zon:1:1: error: number '0123' has leading zero | 3352 | \\input.zon:1:1: error: number '0123' has leading zero |
| 3419 | \\input.zon:1:1: note: use '0o' prefix for octal literals | 3353 | \\input.zon:1:1: note: use '0o' prefix for octal literals |
| 3420 | \\ | | |
| 3421 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3354 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 3422 | } | 3355 | } |
| 3423 | } | 3356 | } |
| ... | @@ -3438,7 +3371,6 @@ test "std.zon negative char" { | ... | @@ -3438,7 +3371,6 @@ test "std.zon negative char" { |
| 3438 | })); | 3371 | })); |
| 3439 | try std.testing.expectFmt( | 3372 | try std.testing.expectFmt( |
| 3440 | \\input.zon:1:1: error: expected number or 'inf' after '-' | 3373 | \\input.zon:1:1: error: expected number or 'inf' after '-' |
| 3441 | \\ | | |
| 3442 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3374 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 3443 | } | 3375 | } |
| 3444 | { | 3376 | { |
| ... | @@ -3450,7 +3382,6 @@ test "std.zon negative char" { | ... | @@ -3450,7 +3382,6 @@ test "std.zon negative char" { |
| 3450 | })); | 3382 | })); |
| 3451 | try std.testing.expectFmt( | 3383 | try std.testing.expectFmt( |
| 3452 | \\input.zon:1:1: error: expected number or 'inf' after '-' | 3384 | \\input.zon:1:1: error: expected number or 'inf' after '-' |
| 3453 | \\ | | |
| 3454 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3385 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 3455 | } | 3386 | } |
| 3456 | } | 3387 | } |
| ... | @@ -3638,7 +3569,6 @@ test "std.zon parse float" { | ... | @@ -3638,7 +3569,6 @@ test "std.zon parse float" { |
| 3638 | })); | 3569 | })); |
| 3639 | try std.testing.expectFmt( | 3570 | try std.testing.expectFmt( |
| 3640 | \\input.zon:1:1: error: expected number or 'inf' after '-' | 3571 | \\input.zon:1:1: error: expected number or 'inf' after '-' |
| 3641 | \\ | | |
| 3642 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3572 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 3643 | } | 3573 | } |
| 3644 | | 3574 | |
| ... | @@ -3652,7 +3582,6 @@ test "std.zon parse float" { | ... | @@ -3652,7 +3582,6 @@ test "std.zon parse float" { |
| 3652 | })); | 3582 | })); |
| 3653 | try std.testing.expectFmt( | 3583 | try std.testing.expectFmt( |
| 3654 | \\input.zon:1:1: error: expected type 'i8' | 3584 | \\input.zon:1:1: error: expected type 'i8' |
| 3655 | \\ | | |
| 3656 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3585 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 3657 | } | 3586 | } |
| 3658 | | 3587 | |
| ... | @@ -3666,7 +3595,6 @@ test "std.zon parse float" { | ... | @@ -3666,7 +3595,6 @@ test "std.zon parse float" { |
| 3666 | })); | 3595 | })); |
| 3667 | try std.testing.expectFmt( | 3596 | try std.testing.expectFmt( |
| 3668 | \\input.zon:1:1: error: expected type 'i8' | 3597 | \\input.zon:1:1: error: expected type 'i8' |
| 3669 | \\ | | |
| 3670 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3598 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 3671 | } | 3599 | } |
| 3672 | | 3600 | |
| ... | @@ -3680,7 +3608,6 @@ test "std.zon parse float" { | ... | @@ -3680,7 +3608,6 @@ test "std.zon parse float" { |
| 3680 | })); | 3608 | })); |
| 3681 | try std.testing.expectFmt( | 3609 | try std.testing.expectFmt( |
| 3682 | \\input.zon:1:1: error: expected type 'i8' | 3610 | \\input.zon:1:1: error: expected type 'i8' |
| 3683 | \\ | | |
| 3684 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3611 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 3685 | } | 3612 | } |
| 3686 | | 3613 | |
| ... | @@ -3694,7 +3621,6 @@ test "std.zon parse float" { | ... | @@ -3694,7 +3621,6 @@ test "std.zon parse float" { |
| 3694 | })); | 3621 | })); |
| 3695 | try std.testing.expectFmt( | 3622 | try std.testing.expectFmt( |
| 3696 | \\input.zon:1:1: error: expected type 'i8' | 3623 | \\input.zon:1:1: error: expected type 'i8' |
| 3697 | \\ | | |
| 3698 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3624 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 3699 | } | 3625 | } |
| 3700 | | 3626 | |
| ... | @@ -3710,7 +3636,6 @@ test "std.zon parse float" { | ... | @@ -3710,7 +3636,6 @@ test "std.zon parse float" { |
| 3710 | \\input.zon:1:1: error: invalid expression | 3636 | \\input.zon:1:1: error: invalid expression |
| 3711 | \\input.zon:1:1: note: ZON allows identifiers 'true', 'false', 'null', 'inf', and 'nan' | 3637 | \\input.zon:1:1: note: ZON allows identifiers 'true', 'false', 'null', 'inf', and 'nan' |
| 3712 | \\input.zon:1:1: note: precede identifier with '.' for an enum literal | 3638 | \\input.zon:1:1: note: precede identifier with '.' for an enum literal |
| 3713 | \\ | | |
| 3714 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3639 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 3715 | } | 3640 | } |
| 3716 | | 3641 | |
| ... | @@ -3723,7 +3648,6 @@ test "std.zon parse float" { | ... | @@ -3723,7 +3648,6 @@ test "std.zon parse float" { |
| 3723 | })); | 3648 | })); |
| 3724 | try std.testing.expectFmt( | 3649 | try std.testing.expectFmt( |
| 3725 | \\input.zon:1:1: error: expected number or 'inf' after '-' | 3650 | \\input.zon:1:1: error: expected number or 'inf' after '-' |
| 3726 | \\ | | |
| 3727 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3651 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 3728 | } | 3652 | } |
| 3729 | | 3653 | |
| ... | @@ -3740,7 +3664,6 @@ test "std.zon parse float" { | ... | @@ -3740,7 +3664,6 @@ test "std.zon parse float" { |
| 3740 | ); | 3664 | ); |
| 3741 | try std.testing.expectFmt( | 3665 | try std.testing.expectFmt( |
| 3742 | \\input.zon:1:1: error: expected type 'f32' | 3666 | \\input.zon:1:1: error: expected type 'f32' |
| 3743 | \\ | | |
| 3744 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3667 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 3745 | } | 3668 | } |
| 3746 | } | 3669 | } |
| ... | @@ -3982,7 +3905,6 @@ test "std.zon vector" { | ... | @@ -3982,7 +3905,6 @@ test "std.zon vector" { |
| 3982 | ); | 3905 | ); |
| 3983 | try std.testing.expectFmt( | 3906 | try std.testing.expectFmt( |
| 3984 | \\input.zon:1:2: error: expected 2 array elements; found 1 | 3907 | \\input.zon:1:2: error: expected 2 array elements; found 1 |
| 3985 | \\ | | |
| 3986 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3908 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 3987 | } | 3909 | } |
| 3988 | | 3910 | |
| ... | @@ -3999,7 +3921,6 @@ test "std.zon vector" { | ... | @@ -3999,7 +3921,6 @@ test "std.zon vector" { |
| 3999 | ); | 3921 | ); |
| 4000 | try std.testing.expectFmt( | 3922 | try std.testing.expectFmt( |
| 4001 | \\input.zon:1:13: error: index 2 outside of array of length 2 | 3923 | \\input.zon:1:13: error: index 2 outside of array of length 2 |
| 4002 | \\ | | |
| 4003 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3924 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 4004 | } | 3925 | } |
| 4005 | | 3926 | |
| ... | @@ -4016,7 +3937,6 @@ test "std.zon vector" { | ... | @@ -4016,7 +3937,6 @@ test "std.zon vector" { |
| 4016 | ); | 3937 | ); |
| 4017 | try std.testing.expectFmt( | 3938 | try std.testing.expectFmt( |
| 4018 | \\input.zon:1:8: error: expected type 'f32' | 3939 | \\input.zon:1:8: error: expected type 'f32' |
| 4019 | \\ | | |
| 4020 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3940 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 4021 | } | 3941 | } |
| 4022 | | 3942 | |
| ... | @@ -4033,7 +3953,6 @@ test "std.zon vector" { | ... | @@ -4033,7 +3953,6 @@ test "std.zon vector" { |
| 4033 | ); | 3953 | ); |
| 4034 | try std.testing.expectFmt( | 3954 | try std.testing.expectFmt( |
| 4035 | \\input.zon:1:1: error: expected type '@Vector(3, u8)' | 3955 | \\input.zon:1:1: error: expected type '@Vector(3, u8)' |
| 4036 | \\ | | |
| 4037 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3956 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 4038 | } | 3957 | } |
| 4039 | | 3958 | |
| ... | @@ -4050,7 +3969,6 @@ test "std.zon vector" { | ... | @@ -4050,7 +3969,6 @@ test "std.zon vector" { |
| 4050 | ); | 3969 | ); |
| 4051 | try std.testing.expectFmt( | 3970 | try std.testing.expectFmt( |
| 4052 | \\input.zon:1:6: error: expected type 'u8' | 3971 | \\input.zon:1:6: error: expected type 'u8' |
| 4053 | \\ | | |
| 4054 | , "{f}", .{diagnostics.fmt("input.zon")}); | 3972 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 4055 | } | 3973 | } |
| 4056 | } | 3974 | } |
| ... | @@ -4244,7 +4162,6 @@ test "std.zon add pointers" { | ... | @@ -4244,7 +4162,6 @@ test "std.zon add pointers" { |
| 4244 | ); | 4162 | ); |
| 4245 | try std.testing.expectFmt( | 4163 | try std.testing.expectFmt( |
| 4246 | \\input.zon:1:1: error: expected type '?u8' | 4164 | \\input.zon:1:1: error: expected type '?u8' |
| 4247 | \\ | | |
| 4248 | , "{f}", .{diagnostics.fmt("input.zon")}); | 4165 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 4249 | } | 4166 | } |
| 4250 | | 4167 | |
| ... | @@ -4260,7 +4177,6 @@ test "std.zon add pointers" { | ... | @@ -4260,7 +4177,6 @@ test "std.zon add pointers" { |
| 4260 | ); | 4177 | ); |
| 4261 | try std.testing.expectFmt( | 4178 | try std.testing.expectFmt( |
| 4262 | \\input.zon:1:1: error: expected type '?f32' | 4179 | \\input.zon:1:1: error: expected type '?f32' |
| 4263 | \\ | | |
| 4264 | , "{f}", .{diagnostics.fmt("input.zon")}); | 4180 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 4265 | } | 4181 | } |
| 4266 | | 4182 | |
| ... | @@ -4276,7 +4192,6 @@ test "std.zon add pointers" { | ... | @@ -4276,7 +4192,6 @@ test "std.zon add pointers" { |
| 4276 | ); | 4192 | ); |
| 4277 | try std.testing.expectFmt( | 4193 | try std.testing.expectFmt( |
| 4278 | \\input.zon:1:1: error: expected type '?@Vector(3, u8)' | 4194 | \\input.zon:1:1: error: expected type '?@Vector(3, u8)' |
| 4279 | \\ | | |
| 4280 | , "{f}", .{diagnostics.fmt("input.zon")}); | 4195 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 4281 | } | 4196 | } |
| 4282 | | 4197 | |
| ... | @@ -4292,7 +4207,6 @@ test "std.zon add pointers" { | ... | @@ -4292,7 +4207,6 @@ test "std.zon add pointers" { |
| 4292 | ); | 4207 | ); |
| 4293 | try std.testing.expectFmt( | 4208 | try std.testing.expectFmt( |
| 4294 | \\input.zon:1:1: error: expected type '?bool' | 4209 | \\input.zon:1:1: error: expected type '?bool' |
| 4295 | \\ | | |
| 4296 | , "{f}", .{diagnostics.fmt("input.zon")}); | 4210 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 4297 | } | 4211 | } |
| 4298 | | 4212 | |
| ... | @@ -4308,7 +4222,6 @@ test "std.zon add pointers" { | ... | @@ -4308,7 +4222,6 @@ test "std.zon add pointers" { |
| 4308 | ); | 4222 | ); |
| 4309 | try std.testing.expectFmt( | 4223 | try std.testing.expectFmt( |
| 4310 | \\input.zon:1:1: error: expected optional struct | 4224 | \\input.zon:1:1: error: expected optional struct |
| 4311 | \\ | | |
| 4312 | , "{f}", .{diagnostics.fmt("input.zon")}); | 4225 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 4313 | } | 4226 | } |
| 4314 | | 4227 | |
| ... | @@ -4324,7 +4237,6 @@ test "std.zon add pointers" { | ... | @@ -4324,7 +4237,6 @@ test "std.zon add pointers" { |
| 4324 | ); | 4237 | ); |
| 4325 | try std.testing.expectFmt( | 4238 | try std.testing.expectFmt( |
| 4326 | \\input.zon:1:1: error: expected optional tuple | 4239 | \\input.zon:1:1: error: expected optional tuple |
| 4327 | \\ | | |
| 4328 | , "{f}", .{diagnostics.fmt("input.zon")}); | 4240 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 4329 | } | 4241 | } |
| 4330 | | 4242 | |
| ... | @@ -4340,7 +4252,6 @@ test "std.zon add pointers" { | ... | @@ -4340,7 +4252,6 @@ test "std.zon add pointers" { |
| 4340 | ); | 4252 | ); |
| 4341 | try std.testing.expectFmt( | 4253 | try std.testing.expectFmt( |
| 4342 | \\input.zon:1:1: error: expected optional union | 4254 | \\input.zon:1:1: error: expected optional union |
| 4343 | \\ | | |
| 4344 | , "{f}", .{diagnostics.fmt("input.zon")}); | 4255 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 4345 | } | 4256 | } |
| 4346 | | 4257 | |
| ... | @@ -4356,7 +4267,6 @@ test "std.zon add pointers" { | ... | @@ -4356,7 +4267,6 @@ test "std.zon add pointers" { |
| 4356 | ); | 4267 | ); |
| 4357 | try std.testing.expectFmt( | 4268 | try std.testing.expectFmt( |
| 4358 | \\input.zon:1:1: error: expected optional array | 4269 | \\input.zon:1:1: error: expected optional array |
| 4359 | \\ | | |
| 4360 | , "{f}", .{diagnostics.fmt("input.zon")}); | 4270 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 4361 | } | 4271 | } |
| 4362 | | 4272 | |
| ... | @@ -4372,7 +4282,6 @@ test "std.zon add pointers" { | ... | @@ -4372,7 +4282,6 @@ test "std.zon add pointers" { |
| 4372 | ); | 4282 | ); |
| 4373 | try std.testing.expectFmt( | 4283 | try std.testing.expectFmt( |
| 4374 | \\input.zon:1:1: error: expected optional array | 4284 | \\input.zon:1:1: error: expected optional array |
| 4375 | \\ | | |
| 4376 | , "{f}", .{diagnostics.fmt("input.zon")}); | 4285 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 4377 | } | 4286 | } |
| 4378 | | 4287 | |
| ... | @@ -4388,7 +4297,6 @@ test "std.zon add pointers" { | ... | @@ -4388,7 +4297,6 @@ test "std.zon add pointers" { |
| 4388 | ); | 4297 | ); |
| 4389 | try std.testing.expectFmt( | 4298 | try std.testing.expectFmt( |
| 4390 | \\input.zon:1:1: error: expected optional array | 4299 | \\input.zon:1:1: error: expected optional array |
| 4391 | \\ | | |
| 4392 | , "{f}", .{diagnostics.fmt("input.zon")}); | 4300 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 4393 | } | 4301 | } |
| 4394 | | 4302 | |
| ... | @@ -4404,7 +4312,6 @@ test "std.zon add pointers" { | ... | @@ -4404,7 +4312,6 @@ test "std.zon add pointers" { |
| 4404 | ); | 4312 | ); |
| 4405 | try std.testing.expectFmt( | 4313 | try std.testing.expectFmt( |
| 4406 | \\input.zon:1:1: error: expected optional array | 4314 | \\input.zon:1:1: error: expected optional array |
| 4407 | \\ | | |
| 4408 | , "{f}", .{diagnostics.fmt("input.zon")}); | 4315 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 4409 | } | 4316 | } |
| 4410 | | 4317 | |
| ... | @@ -4420,7 +4327,6 @@ test "std.zon add pointers" { | ... | @@ -4420,7 +4327,6 @@ test "std.zon add pointers" { |
| 4420 | ); | 4327 | ); |
| 4421 | try std.testing.expectFmt( | 4328 | try std.testing.expectFmt( |
| 4422 | \\input.zon:1:1: error: expected optional string | 4329 | \\input.zon:1:1: error: expected optional string |
| 4423 | \\ | | |
| 4424 | , "{f}", .{diagnostics.fmt("input.zon")}); | 4330 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 4425 | } | 4331 | } |
| 4426 | | 4332 | |
| ... | @@ -4436,7 +4342,6 @@ test "std.zon add pointers" { | ... | @@ -4436,7 +4342,6 @@ test "std.zon add pointers" { |
| 4436 | ); | 4342 | ); |
| 4437 | try std.testing.expectFmt( | 4343 | try std.testing.expectFmt( |
| 4438 | \\input.zon:1:1: error: expected optional enum literal | 4344 | \\input.zon:1:1: error: expected optional enum literal |
| 4439 | \\ | | |
| 4440 | , "{f}", .{diagnostics.fmt("input.zon")}); | 4345 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 4441 | } | 4346 | } |
| 4442 | } | 4347 | } |
| ... | @@ -4697,7 +4602,6 @@ test "std.zon update optionals" { | ... | @@ -4697,7 +4602,6 @@ test "std.zon update optionals" { |
| 4697 | })); | 4602 | })); |
| 4698 | try std.testing.expectFmt( | 4603 | try std.testing.expectFmt( |
| 4699 | \\input.zon:1:12: error: missing required field qux | 4604 | \\input.zon:1:12: error: missing required field qux |
| 4700 | \\ | | |
| 4701 | , "{f}", .{diagnostics.fmt("input.zon")}); | 4605 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 4702 | } | 4606 | } |
| 4703 | | 4607 | |
| ... | @@ -4825,7 +4729,6 @@ test "std.zon update unions" { | ... | @@ -4825,7 +4729,6 @@ test "std.zon update unions" { |
| 4825 | })); | 4729 | })); |
| 4826 | try std.testing.expectFmt( | 4730 | try std.testing.expectFmt( |
| 4827 | \\input.zon:1:12: error: missing required field qux | 4731 | \\input.zon:1:12: error: missing required field qux |
| 4828 | \\ | | |
| 4829 | , "{f}", .{diagnostics.fmt("input.zon")}); | 4732 | , "{f}", .{diagnostics.fmt("input.zon")}); |
| 4830 | } | 4733 | } |
| 4831 | | 4734 | |