1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
use ;
/// Indicate the position of the documentation.
/// This function will show the line number and column number of the position.
///
/// ```
/// use yaml_peg::indicated_msg;
///
/// let doc = indicated_msg(b"{\"a\": \n[\"b\", \"c\", \"d\"]}", 13);
/// assert_eq!(doc, "2:7\n[\"b\", \"c\", \"d\"]}\n ^")
/// ```
///
/// If print the string, it would be like:
///
/// ```bash
/// 2:7
/// ["b", "c", "d"]}
/// ^
/// ```
///
/// This may be what you need if you went to indicate an error on the invalid
/// data.
/// Same as [`indicated_msg`], but join the path before message.
///
/// ```
/// use yaml_peg::indicated_msg_file;
///
/// let doc = indicated_msg_file("my/file.yaml", b"{\"a\": \n[\"b\", \"c\", \"d\"]}", 13);
/// assert_eq!(doc, "my/file.yaml:2:7\n[\"b\", \"c\", \"d\"]}\n ^")
/// ```
///
/// If print the string, it would be like:
///
/// ```bash
/// my/file.yaml:2:7
/// ["b", "c", "d"]}
/// ^
/// ```