sandersn / mini-typescript

A miniature model of the Typescript compiler, intended to teach the structure of the real Typescript compiler
MIT License
1.14k stars 61 forks source link

fix when literal is string #2

Open hkc452 opened 3 years ago

hkc452 commented 3 years ago

fix when the type of Literal Expression is string

sandersn commented 3 years ago

It looks like you're trying the exercise to add string literals. A couple of comments:

  1. I haven't figured out how people should try the exercises. I can look at PRs here if you want.
  2. What you have is the addition you need for the checker, but for new syntax like string literals, you'll also need substantial additions in the types, lexer and parser.
Zzzen commented 3 years ago

Maybe add some test & baseline files so beginners can try it out themselves? And enable discussion here?

Zzzen commented 3 years ago

I guess documentation on how to debug tests on vscode would be helpful.

sandersn commented 3 years ago

Those are both really good ideas. I could make a branch that adds the tests and baselines and then people could fork from that branch.

I haven't actually debugged mini-typescript -- just console.log debugging -- so it'll take me some fiddling to get that set up, but it's definitely needed.

sandersn commented 3 years ago

12 kicks off discussions