LivelyKernel / lively.modules

JavaScript package and module system for interactive development
8 stars 1 forks source link

class statement as expression does not work.... #8

Closed JensLincke closed 8 years ago

JensLincke commented 8 years ago
var bar = class Foo {

}

Original:

Error:SyntaxError: https://lively-kernel.org/lively4/ContextJS/Layers.js: Unexpected token (749:52)
      747 | }
      748 | __lvVarRecorder.LayerableObject = LayerableObject;
    > 749 | __lvVarRecorder.cop.COPError = class __lvVarRecorder.COPError {
          |                                                     ^
      750 |     constructor(message) {
      751 |         this._msg = __lvVarRecorder.msg;
      752 |     }
        at Parser.pp.raise (https://lively-kernel.org/lively4/lively4-core/src/external/babel-browser.js:65149:13)
        at Parser.pp.unexpected (https://lively-kernel.org/lively4/lively4-core/src/external/babel-browser.js:66379:8)
        at Parser.pp.expect (https://lively-kernel.org/lively4/lively4-core/src/external/babel-browser.js:66373:33)
        at Parser.pp.parseClass (https://lively-kernel.org/lively4/lively4-core/src/external/babel-browser.js:65991:8)
        at Parser.pp.parseExprAtom (https://lively-kernel.org/lively4/lively4-core/src/external/babel-browser.js:64582:19)
        at Parser.eval [as parseExprAtom] (https://lively-kernel.org/lively4/lively4-core/src/external/babel-browser.js:67755:22)
        at Parser.pp.parseExprSubscripts (https://lively-kernel.org/lively4/lively4-core/src/external/babel-browser.js:64413:19)
        at Parser.pp.parseMaybeUnary (https://lively-kernel.org/lively4/lively4-core/src/external/babel-browser.js:64394:19)
        at Parser.pp.parseExprOps (https://lively-kernel.org/lively4/lively4-core/src/external/babel-browser.js:64340:19)
        at Parser.pp.parseMaybeConditional (https://lively-kernel.org/lively4/lively4-core/src/external/babel-browser.js:64322:19)
        at Parser.pp.parseMaybeAssign (https://lively-kernel.org/lively4/lively4-core/src/external/babel-browser.js:64289:19)
    Error loading https://lively-kernel.org/lively4/ContextJS/Layers.js
Line:undefined Col: undefined
Source:undefined
Error:null

@j4yk