MCPcopy Create free account
hub / github.com/WheretIB/nullc / ParseBreakExpr

Function ParseBreakExpr

NULLC/Parser.cpp:1695–1708  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1693}
1694
1695bool ParseBreakExpr(Lexeme** str)
1696{
1697 const char *pos = (*str)->pos;
1698 if(!ParseLexem(str, lex_break))
1699 return false;
1700
1701 if(!ParseTerminal(str))
1702 AddVoidNode();
1703
1704 if(!ParseLexem(str, lex_semicolon))
1705 ThrowError((*str)->pos, "ERROR: break statement must be followed by ';'");
1706 AddBreakNode(pos);
1707 return true;
1708}
1709
1710bool ParseContinueExpr(Lexeme** str)
1711{

Callers 1

ParseExpressionFunction · 0.85

Calls 5

ParseLexemFunction · 0.85
ParseTerminalFunction · 0.85
AddVoidNodeFunction · 0.85
ThrowErrorFunction · 0.85
AddBreakNodeFunction · 0.85

Tested by

no test coverage detected