Add $__loc__ (fix #740)
This commit is contained in:
1 parent
1dcfc2f547
commit
24005287f4
10 files changed
+1178
-1152
No files matched your search
@@ -804,6 +804,18 @@ sections:
|
||||
null and objects would, but with the given message as the
|
||||
error's value.
|
||||
|
||||
- title: "`$__loc__`"
|
||||
body: |
|
||||
|
||||
Produces an object with a "file" key and a "line" key, with
|
||||
the filename and line number where `$__loc__` occurs, as
|
||||
values.
|
||||
|
||||
examples:
|
||||
- program: 'try error("\($__loc__)") catch .'
|
||||
input: 'null'
|
||||
output: ['"{\"file\":\"<top-level>\",\"line\":1}"']
|
||||
|
||||
- title: "`map(x)`, `map_values(x)`"
|
||||
body: |
|
||||
|
||||
|
||||
Reference in new issue
Block a user