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

Function parse_condition

js/SCASTPY.js:465–493  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

463 return r
464 }
465 function parse_condition() {
466 var r={
467 type: "Condition",
468 poi:{line:input.peek().poi.line,start:input.peek().poi.start},
469 value:'',
470 body:[]
471 }
472 while (!is_sp(":")) {
473 let n=null;
474 if(is_id()){
475 r.value+=input.peek().value+' '
476 n=input.next()
477 if(is_punc('(')){
478 r.body.push({
479 type:"CallExpression",
480 value:n.value,
481 poi:{line:n.poi.line,start:n.poi.start},
482 body:[parse_arguments()],
483 })
484 }
485 continue
486 }else{
487 n=input.next()
488 }
489 r.value+=n.value+' ';
490 r.body.push(n)
491 }
492 return r
493 }
494 function parse_if(){
495 var n = input.next();
496 var r={

Callers 4

parse_ifFunction · 0.70
parse_exceptFunction · 0.70
parse_loopFunction · 0.70
parse_withFunction · 0.70

Calls 4

is_spFunction · 0.70
is_idFunction · 0.70
is_puncFunction · 0.70
parse_argumentsFunction · 0.70

Tested by

no test coverage detected