The C# compiler he is taking about is open source, so you could have a play around with it to see how they implemented it.  <a href="https:&#x2F;&#x2F;github.com&#x2F;dotnet&#x2F;roslyn" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dotnet&#x2F;roslyn</a>