private void ifStatement() {
		boolean hasElse = false;
		
		lex(); expect(TK_OPENPAREN);
		
		// condition
		expression();
		expect(TK_CLOSEPAREN);
		
		int ifStart = _func.addInst(JMPF, 0); // 0 is the amount to jump so far
		
		beginScope();
		statement();
		if (_pretoken != TK_CLOSEBRACE && _pretoken != TK_SEMICOLON)
			checkSemi();
		endScope();
		
		int ifEnd = _func.getCurrentInstPos();
		
		if (_token == TK_ELSE) {
			lex();
			hasElse = true;
			
			int elseStart = _func.addInst(JMP, 0); // 0 is the amount to jump so far
			
			beginScope();
			statement();
			if (_pretoken != TK_CLOSEBRACE && _pretoken != TK_SEMICOLON)
				checkSemi();
			endScope();
			
			_func.setInstArg(elseStart, 0, _func.getCurrentInstPos() - elseStart);
		}
		
		_func.setInstArg(ifStart, 0, ifEnd - ifStart + (hasElse ? 1 : 0));
	}