MCPcopy Create free account
hub / github.com/dannykopping/b3 / parseLine

Function parseLine

cli.js:29–50  ·  view source on GitHub ↗
(line)

Source from the content-addressed store, hash-verified

27rl.on('line', parseLine);
28
29function parseLine(line) {
30 try {
31 debug('Received line: ' + line);
32
33 let parsed = parser.parseLine(line, {debug:true});
34 console.log(outputLine(parsed));
35 } catch(e) {
36 switch(true) {
37 case e instanceof errors.UnfinishedSyscallException:
38 debug('Encountered partial syscall, skipping: ' + line);
39 // suppress
40 return;
41 }
42
43 debug('[PARSE ERROR] ' + e);
44 if(program.stopOnFail) {
45 console.error('[PARSE ERROR] ' + e);
46 debug('Exiting due to stopOnFail argument');
47 process.exit(1);
48 }
49 }
50}
51
52// TODO: some kind of buffering solution to boost performance?
53function outputLine(line) {

Callers

nothing calls this directly

Calls 1

outputLineFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…