## 2017-09-06


Specs for "await" support in workspaces...

```javascript
import Github from "src/client/github.js"; // AUTO MOVED HERE ... hoist the imports... we can do it!



var commit

export function hello() { // hoisted here... because of export
  return commit2
}

export function hello2() { // housed here ... because of export
  return commit2
}

export {commit as c} // hoisted here ... will export undefined


(async () => { // AUTO
  return do { // AUTO
  // import .. moved away

  // CASE 1
  commit = await Github.current().getURLAuthorized('https://api.github.com/repos/LivelyKernel/lively4-core/commits').then(r => r.json());
    
  // CASE 2    
  // export function hello() { // AUTO moved away
  //  return commit2
  // }
    
  commit2 = await Github.current().getURLAuthorized('https://api.github.com/repos/LivelyKernel/lively4-core/commits').then(r => r.json());
  // export {commit2 as c} // AUTO

  // export function hello2() {
  //  return commit2
  // }

  // return   
  "hello world"
  }
})() // AUTO

```

### Algorithm:

1. hoist imports
2. hoist exports
3. split and variable declaration and asssignment
3. wrap rest of expressions in ``() => { return do: { /*REST*/ }}``


