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

Function parse_statement

js/SCAST.js:591–603  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

589 }
590
591 function parse_statement() {
592 try{
593 if(is_punc(";")) skip_punc(";");
594 else if(is_define()) return parse_define();
595 else if(is_kw("for")||is_kw("while")||is_kw("foreach"))return parse_loop();
596 else if(is_kw("if")||is_kw("else")||is_kw("switch"))return parse_if();
597 else return parse_expression();
598 }catch(err){
599 var p=input.peek()
600 console.warn(`parse statement ${p.type} ${p.value} at ${p.poi.line}:${p.poi.start}:${p.poi.end}`,err)
601 }
602
603 }
604 }
605
606 function InputStream(input) {

Callers 2

parse_toplevelFunction · 0.70
parse_blockFunction · 0.70

Calls 8

is_puncFunction · 0.70
skip_puncFunction · 0.70
is_defineFunction · 0.70
parse_defineFunction · 0.70
is_kwFunction · 0.70
parse_loopFunction · 0.70
parse_ifFunction · 0.70
parse_expressionFunction · 0.70

Tested by

no test coverage detected