Function yaml_peg::indicated_msg_file
source · pub fn indicated_msg_file(path: &str, doc: &[u8], pos: u64) -> String
Expand description
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:
my/file.yaml:2:7
["b", "c", "d"]}
^