NerdLang / nerd

🔱 Javascript's God Mode. No VM. No Bytecode. No GC. Just native binaries.
https://nectarjs.com
MIT License
3.58k stars 126 forks source link

unexpected token bootstrap #73

Open Raynos opened 4 years ago

Raynos commented 4 years ago
raynos at raynos-Precision-5530  
~/projects/fake-ses on master*
$ nectar test/index.js -o out
[*] Generating source file
[error] Parsing error: Unexpected token bootstrap line 20 column 9 in file test/test-harness.js
class TestHarness {
  constructor () {
    /** @type {FakeSESServer} */
    this.sesServer = new FakeSESServer({ port: 0 })
    /** @type {AWS.SES | null} */
    this.ses = null
  }

  /** @returns {Promise<void>} */
  async bootstrap () {
    const hostPort = await this.sesServer.bootstrap()

    this.ses = new AWS.SES({
      region: 'us-east-1',
      endpoint: `http://${hostPort}`,
      sslEnabled: false,
      accessKeyId: '123',
      secretAccessKey: 'abc'
    })
  }

Does it support async methods ?

adrien-thierry commented 4 years ago

Hi @Raynos ,

Thank you for reporting the issue, it's not supporting async yet, I will add it to the todo list