MCPcopy Index your code
hub / github.com/asm-js/validator / locToString

Function locToString

lib/fail.js:45–58  ·  view source on GitHub ↗
(loc)

Source from the content-addressed store, hash-verified

43
44// (Loc) -> str
45function locToString(loc) {
46 return match(loc, function(when) {
47 when({
48 start: { line: match.var('sl'), column: match.var('sc') },
49 end: { line: match.var('el'), column: match.var('ec') }
50 }, function(vars) {
51 return " at " + vars.sl + ":" + vars.sc + "-" + vars.el + ":" + vars.ec;
52 });
53
54 when(match.any, function() {
55 return "";
56 });
57 });
58}
59
60fail.locToString = locToString;
61

Callers 1

failFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected