Skip to content

Latest commit

 

History

History
96 lines (76 loc) · 4.96 KB

JS-CONFORMANCE.md

File metadata and controls

96 lines (76 loc) · 4.96 KB

JS-CONFORMANCE — the JavaScript grammar against tsc's JS-mode parser (auto-generated)

Every single-file case of the pinned TypeScript conformance corpus, parsed as a .js file by tsc and by javascript.ts. tsc's verdict is its parse diagnostics, then the JS-only syntactic diagnostics its program reports for a .js file; codes 8000-8999 ("... can only be used in TypeScript files") mark TypeScript-only syntax, which the JS grammar has no production for. The cells and the rules are documented in test/js-conformance-corpus.ts; the gate fails when this record is stale, so every file that moves between cells shows in its diff.

Corpus: microsoft/TypeScript@6fbce89821d93a5b761581d9ac540455f38e9acb tests/cases/conformance · oracle: typescript@5.9.3

4462 files measured, 4420 agree (99.06%) · 1196 multi-file cases skipped · 1 excluded as oracle crashes (ORACLE_CRASHES in the test, by name).

cell (tsc / monogram) files
js/accept 1146 agree: valid JavaScript per tsc, accepted
js/reject 41 disagree: valid JavaScript per tsc, rejected: candidate gaps (read each derivation)
ts-only/reject 2713 agree: TypeScript-only syntax per tsc, rejected
ts-only/accept 0 disagree: TypeScript-only syntax per tsc, accepted: over-acceptance
js-error/reject 1 agree: a JS-only syntactic error per tsc, rejected
js-error/accept 0 disagree: a JS-only syntactic error per tsc, accepted: over-acceptance
reject/reject 560 agree: a tsc parse error, rejected
reject/accept 1 disagree: a tsc parse error, accepted: over-acceptance
monogram-crash 0 disagree: monogram threw something other than an input error: a bug

js/reject (41)

Valid JavaScript per tsc, rejected: candidate gaps (read each derivation).

  • async/es5/asyncClass_es5.ts
  • async/es5/asyncGetter_es5.ts
  • async/es5/asyncSetter_es5.ts
  • async/es6/asyncClass_es6.ts
  • async/es6/asyncGetter_es6.ts
  • async/es6/asyncSetter_es6.ts
  • classes/classStaticBlock/classStaticBlock20.ts
  • classes/members/privateNames/privateNameStaticMethodAsync.ts
  • es6/for-ofStatements/for-of-excess-declarations.ts
  • es6/variableDeclarations/VariableDeclaration1_es6.ts
  • esDecorators/esDecorators-arguments.ts
  • parser/ecmascript5/ClassDeclarations/parserClassDeclaration1.ts
  • parser/ecmascript5/ClassDeclarations/parserClassDeclaration6.ts
  • parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration3.ts
  • parser/ecmascript5/ErrorRecovery/ExtendsOrImplementsClauses/parserErrorRecovery_ExtendsOrImplementsClause1.ts
  • parser/ecmascript5/ErrorRecovery/ExtendsOrImplementsClauses/parserErrorRecovery_ExtendsOrImplementsClause2.ts
  • parser/ecmascript5/ErrorRecovery/VariableLists/parserErrorRecovery_VariableList1.ts
  • parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration10.ts
  • parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclaration4.ts
  • parser/ecmascript5/Statements/parserES5ForOfStatement2.ts
  • parser/ecmascript5/Statements/parserES5ForOfStatement21.ts
  • parser/ecmascript5/Statements/parserES5ForOfStatement3.ts
  • parser/ecmascript5/Statements/parserES5ForOfStatement6.ts
  • parser/ecmascript5/Statements/parserForInStatement2.ts
  • parser/ecmascript5/Statements/parserForInStatement3.ts
  • parser/ecmascript5/Statements/parserForInStatement6.ts
  • parser/ecmascript5/VariableDeclarations/parserVariableDeclaration10.ts
  • parser/ecmascript5/VariableDeclarations/parserVariableDeclaration5.ts
  • parser/ecmascript5/VariableDeclarations/parserVariableDeclaration6.ts
  • parser/ecmascript5/VariableDeclarations/parserVariableDeclaration8.ts
  • parser/ecmascript6/Iterators/parserForOfStatement2.ts
  • parser/ecmascript6/Iterators/parserForOfStatement21.ts
  • parser/ecmascript6/Iterators/parserForOfStatement22.ts
  • parser/ecmascript6/Iterators/parserForOfStatement3.ts
  • parser/ecmascript6/Iterators/parserForOfStatement6.ts
  • parser/ecmascript6/ShorthandPropertyAssignment/parserShorthandPropertyAssignment5.ts
  • statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForIn.ts
  • statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForOf.3.ts
  • statements/VariableStatements/usingDeclarations/usingDeclarationsInForIn.ts
  • statements/VariableStatements/usingDeclarations/usingDeclarationsInForOf.3.ts
  • statements/labeledStatements/labeledStatementDeclarationListInLoopNoCrash1.ts

ts-only/accept (0)

TypeScript-only syntax per tsc, accepted: over-acceptance.

None.

js-error/accept (0)

A JS-only syntactic error per tsc, accepted: over-acceptance.

None.

reject/accept (1)

A tsc parse error, accepted: over-acceptance.

  • statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.4.ts

monogram-crash (0)

Monogram threw something other than an input error: a bug.

None.