Skip to content

Initial port of compiler #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 21, 2024
Merged

Initial port of compiler #1

merged 4 commits into from
Oct 21, 2024

Conversation

ahejlsberg
Copy link
Member

Initial port of TypeScript compiler to Go. Currently includes scanner, parser, binder, and beginnings of program construction and checker. For now, very simple project model: All files must be under a common root and program consists of all .ts or .tsx files under that root. No tsconfig.json support yet.

Build and then run on the .ts and .tsx files in a directory

tsgo tscomp

By default this parses and binds all .ts and .tsx files in the directory and then performs a simplified type checking pass that
just resolves identifiers in expression positions. Use -p flag to only parse and bind and skip the check pass. Use -s flag
to parse and bind on a single thread (instead of in parallel on multiple threads). Use -q flag to suppress output of diagnostics.

Lots more to come...

@ahejlsberg ahejlsberg requested a review from jakebailey October 19, 2024 13:31
@ahejlsberg ahejlsberg merged commit da6eb5b into main Oct 21, 2024
10 checks passed
jakebailey pushed a commit that referenced this pull request Jan 17, 2025
Convert tsconfig parsing tests to baselines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants