Skip to content

mutable syntax issue #35

@a10k

Description

@a10k

The below .ojs markup works perfectly on observable, the parser library is able to parse it correctly as a block cell too, but in the new interpreter this fails.

mutable x = []
{
  mutable x.push(1);
  mutable x = mutable x;
}

Console error when it fails

VM130:3 Uncaught (in promise) SyntaxError: Invalid or unexpected token
    at new Function (<anonymous>)
    at createRegularCellDefinition (index.js:formatted:7648)
    at Interpreter.cell (index.js:formatted:7737)
    at Interpreter.module (index.js:formatted:7694)
    at HTMLDivElement.eval (observablehq-214:8)
    at worker.8767064650b2824c13f8f3e3a6bb3bd4accb75c98d9277e71e09afe4bedf282d.js:2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions