================ idCompiler::ParseDoWhileStatement ================ */
| 1895 | ================ |
| 1896 | */ |
| 1897 | void 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 | ================ |
nothing calls this directly
no test coverage detected