MCPcopy Create free account
hub / github.com/davidkingzyb/SCAST / parse_loop

Function parse_loop

js/SCAST.js:442–458  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

440 return r
441 }
442 function parse_loop(){
443 var n = input.next();
444 if(is_punc('(')){
445 r={
446 type:"LoopStatement",
447 value:n.value,
448 poi:{line:n.poi.line,start:n.poi.start},
449 condition:parse_condition(),
450 // body:parse_block().body
451 }
452 if(is_punc('{'))r.body=parse_block().body
453 return r
454 }else{
455 console.warn("parse loop",input.peek())
456 return n;
457 }
458 }
459 function parse_if(){
460 var n = input.next();
461 var r={

Callers 1

parse_statementFunction · 0.70

Calls 3

is_puncFunction · 0.70
parse_conditionFunction · 0.70
parse_blockFunction · 0.70

Tested by

no test coverage detected