1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-11-15 14:25:51 +00:00
Files
bat/tests/syntax-tests/highlighted/JQ/sample.jq
dependabot[bot] cd81c7fa6b Bump assets/syntaxes/02_Extra/SublimeJQ from 6870582 to b7e53e5 (#2820)
* Bump assets/syntaxes/02_Extra/SublimeJQ from `6870582` to `b7e53e5`

Bumps [assets/syntaxes/02_Extra/SublimeJQ](https://github.com/zogwarg/SublimeJQ) from `6870582` to `b7e53e5`.
- [Commits](687058289c...b7e53e5d86)

---
updated-dependencies:
- dependency-name: assets/syntaxes/02_Extra/SublimeJQ
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* update highlighted version of sample.jq

* update changelog

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Keith Hall <kingkeith+github@gmail.com>
2024-01-03 14:16:33 +00:00

8.9 KiB
Vendored

import "../imported-file" ;
 
# With Comments !
def weird($a; $b; $c):
[ $a, $b, $c ] | transpose | reduce .[][] as $item (
[];
. + $item.property
)
;
 
. | weird (.a; .b; .c) |
 
(
 
if (. | contains("never") ) then
"Why yes"
else
12.23
end
 
) as $never |
 
{
hello,
why: "because",
hello: ( weird | ascii_upcase ),
format_eg: ( . | @json "My json string \( . | this | part | just | white | ascii_upcase | transpose)" ),
never: $never,
"literal_key": literal_value,
"this": 12.1e12,
"part": "almost"
"like": [
12,
2
"json"
{
"quite": {
similar: "but not quite"
}
}
],
} | (
 
# And with very basic brace matching
 
# Invalid End
]
 
# Other invalid ends
( [ } ] )
 
# A "valid" sequence
( [ { key: () , other_key:( [ [] [[]] ] ), gaga } ] )
 
# A "invalid" sequence
( [ { key: () , other_key:( [ [] [[] ] ), gaga } ] )
 
"A string\n whith escaped characters \" because we can"
)