MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / ParseDoWhileStatement

Method ParseDoWhileStatement

neo/d3xp/script/Script_Compiler.cpp:1897–1917  ·  view source on GitHub ↗

================ idCompiler::ParseDoWhileStatement ================ */

Source from the content-addressed store, hash-verified

1895================
1896*/
1897void idCompiler::ParseDoWhileStatement( void ) {
1898 idVarDef *e;
1899 int patch1;
1900
1901 loopDepth++;
1902
1903 patch1 = gameLocal.program.NumStatements();
1904 ParseStatement();
1905 ExpectToken( "while" );
1906 ExpectToken( "(" );
1907 e = GetExpression( TOP_PRIORITY );
1908 ExpectToken( ")" );
1909 ExpectToken( ";" );
1910
1911 EmitOpcode( OP_IF, e, JumpTo( patch1 ) );
1912
1913 // fixup breaks and continues
1914 PatchLoop( patch1, patch1 );
1915
1916 loopDepth--;
1917}
1918
1919/*
1920================

Callers

nothing calls this directly

Calls 1

NumStatementsMethod · 0.45

Tested by

no test coverage detected