Skip to content

view: the code pane's lexer differs from the playground's #2085

Open

Description

@shunichironomura

Warning

This content was written by an AI agent and must be verified by a human developer. After human verification, this alert may be removed.

Found in the review of #2057, which adds the experimental view. Paths refer to #2059's head.

Problem

internals/view.md says the view's code pane uses the playground's lexical colouring. In fact the view has its own lexer: tokenize in web/view/src/formula.ts, which web/view/src/graphcalLanguage.ts builds on. The playground's is web/playground/src/graphcal-language.ts. The two disagree:

  • They treat the reserved word as differently.
  • The view's lexer does not accept _ in an exponent; the playground's does.

Proposed fix

  • First, correct internals/view.md.
  • Then share one lexer between the playground and the view, since they do the same job.

Activity

  1. added
    documentationImprovements or additions to documentation
    webviewThe experimental view (web/view, graphcal view, graphcal/viewModel)
    on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationrefactorwebviewThe experimental view (web/view, graphcal view, graphcal/viewModel)

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions