Skip to content

Remove vestigial immediate keyword. - #65612

Merged
Daniel Rosenwasser (DanielRosenwasser) merged 1 commit into
mainfrom
immediate_hmmMaybeLater
Nov 21, 2026
Merged

Daniel Rosenwasser (DanielRosenwasser) merged 1 commit into
mainfrom
immediate_hmmMaybeLater

Conversation

@DanielRosenwasser

@DanielRosenwasser Daniel Rosenwasser (DanielRosenwasser) commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

It's not clear how this snuck into the codebase. I know we had #58729 and #59580, but they never got merged in. In fact, if you pull up the 6.0 branch, I couldn't find any immediate keyword there. So I'm not sure how we ported this in.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

An explicit regression test for immediate is still needed because the existing keyword-map-derived test would not catch its accidental restoration as a keyword.

1 open issue
5 files not reviewed
  • tsc/internal/api/encoder/decoder_generated.go: Generated file
  • tsc/internal/api/enum_values_generated.go: Generated file
  • tsc/internal/ast/ast_generated.go: Generated file
  • tsc/internal/ast/kind_generated.go: Generated file
  • tsc/internal/ast/kind_stringer_generated.go: Generated file
What changed in this PR

Removes the vestigial immediate keyword from the compiler and JavaScript API, cleaning up syntax support associated with the unmerged experiments.

Changes:

  • Treats immediate as an identifier rather than a keyword.
  • Removes ImmediateKeyword from the AST schema and generated token handling.
  • Updates generated Go and JavaScript syntax-kind values and declarations consistently.
File Description
tsc/​internal/​scanner/​scanner.go Removes immediate from keyword lookup.
tsc/​internal/​ast/​kind_stringer_generated.go Updates kind names and numeric offsets.
tsc/​internal/​ast/​kind_generated.go Removes the kind and updates token-union comments.
tsc/​internal/​ast/​ast_generated.go Removes the kind from generated token handling.
tsc/​internal/​api/​enum_values_generated.go Removes the exported enum mapping.
tsc/​internal/​api/​encoder/​decoder_generated.go Removes the decoder’s keyword case.
tools/​scripts/​tsc/​ast.json Removes the keyword from the source schema.
packages/​typescript/​src/​ast/​ast.generated.ts Updates keyword and token type unions.
packages/​typescript/​enums/​syntaxKind.js Updates runtime enum values and boundaries.
packages/​typescript/​enums/​syntaxKind.d.ts Aligns enum declarations with runtime values.

Review effort: Balanced

"get": ast.KindGetKeyword,
"if": ast.KindIfKeyword,
"immediate": ast.KindImmediateKeyword,
"implements": ast.KindImplementsKeyword,
@github-project-automation github-project-automation Bot moved this from Not started to Needs merge in PR Backlog Nov 20, 2026
Merged via the queue into main with commit 01f1a75 Nov 21, 2026
35 checks passed
@DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser) deleted the immediate_hmmMaybeLater branch November 21, 2026 00:25
@github-project-automation github-project-automation Bot moved this from Needs merge to Done in PR Backlog Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants