fix(parser): color a temperature's name like a timer's in the TextMate grammar #249

Merged
abiwab merged 1 commit from fix/textmate-temperature-name into main 2026-11-25 11:36:51 +01:00
Owner

The TextMate grammar colored a temperature's name (oven in ^oven{180°C}) as a number (constant.numeric.temperature.gram). The name is a label for the heat source, like a timer's name, and the language server already gives both the same semantic token (walkTemperature in semantic-tokens.ts): the wrong color only showed where the server does not color, in Sublime or in VS Code before the server answers.

  • support.type.temperature.gram, on the model of support.type.timer.gram.
  • Patch changeset for @gram-lang/parser and gram-lang.
  • Same role in tree-sitter-gram (854cfed), whose queries follow these scopes.

After merging: merge main into dev/1.6, then bun run build and commit the regenerated packages/parser/syntaxes/gram.tmLanguage (the plist CI checks it).

The TextMate grammar colored a temperature's name (`oven` in `^oven{180°C}`) as a number (`constant.numeric.temperature.gram`). The name is a label for the heat source, like a timer's name, and the language server already gives both the same semantic token (`walkTemperature` in `semantic-tokens.ts`): the wrong color only showed where the server does not color, in Sublime or in VS Code before the server answers. - `support.type.temperature.gram`, on the model of `support.type.timer.gram`. - Patch changeset for `@gram-lang/parser` and `gram-lang`. - Same role in tree-sitter-gram (`854cfed`), whose queries follow these scopes. After merging: merge `main` into `dev/1.6`, then `bun run build` and commit the regenerated `packages/parser/syntaxes/gram.tmLanguage` (the plist CI checks it).
fix(parser): color a temperature's name like a timer's in the TextMate grammar
All checks were successful
CI / Build & Test (pull_request) Successful in 5m8s
079e516712
abiwab merged commit 3dc9232991 into main 2026-11-25 11:36:51 +01:00
abiwab deleted branch fix/textmate-temperature-name 2026-11-25 11:36:51 +01:00
Sign in to join this conversation.
No description provided.