In which language is the C# compiler written?

前端 未结 3 511
死守一世寂寞
死守一世寂寞 2020-12-22 18:38

I looked at the source code at http://referencesource.microsoft.com/, and it appears all the source code is in C#.

I also looked at the source code for the new C# co

3条回答
  •  余生分开走
    2020-12-22 19:01

    The original C# compiler wasn't written in C#, it was in C and C++. The new Roslyn compiler was written in C#, but was initially compiled with the old compiler. Once the new compiler was done, it was able to compile its own source code: this is called bootstrapping.

提交回复
热议问题