You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
view: the code pane's lexer differs from the playground's #2085
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