Skip to content

Commit

Permalink
add parser / grammar and spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen committed Nov 8, 2023
1 parent 9cd23f4 commit 98fe2f9
Show file tree
Hide file tree
Showing 3 changed files with 858 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/contribute/parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,27 @@ title: Parser
---

# Parser

# Conformance Tests

This details the three GitHub repositories for testing our parser against JavaScript and TypeScript grammar.

## Test262

JavaScript has the [ECMAScript Test Suite](https://github.com/tc39/test262) called Test262.
The goal of Test262 is to provide test material that covers every observable behavior specified in the specification.

For testing conformance, please checkout its [parse phase tests](https://github.com/tc39/test262/blob/main/INTERPRETING.md#negative).

## Babel

When new language features are added to JavaScript, it is required to have them get parsed by Babel.
So Babel has another set of [parser tests](https://github.com/babel/babel/tree/main/packages/babel-parser/test).

## TypeScript

The TypeScript conformance tests can be found [here](https://github.com/microsoft/TypeScript/tree/main/tests/cases/conformance).

## Test Runner

Rome has implemented a test runner for the above test suites, they can be found [here](https://github.com/rome/tools/tree/main/xtask/coverage).
Loading

0 comments on commit 98fe2f9

Please sign in to comment.