问题描述
我看了看源代码在,似乎所有的源代码在C#。
I looked at the source code at http://referencesource.microsoft.com/, and it appears all the source code is in C#.
我也看了看源代码,新的C#编译器平台(的),它也是在C#。这怎么可能?是C#语言编译器C#编写的?还是我失去了一些东西明显?如果C#编译器是用C#编写,然后它是如何工作的?
I also looked at the source code for the new C# compiler platform (Roslyn), and it is also in C#. How is that possible? Is C# language compiler written in C#? Or am I missing something obvious? If C# compiler is written in C# then how does it work?
推荐答案
原来的C#编译器没有写在C#中,在C和C ++。新的罗斯林编译器C#语言编写的,但最初是与旧的编译器编译。一旦新的编译器做,它能够编译它自己的源代码:这就是所谓的。
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.
这篇关于在语言C#编译器写的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!