From cb745ec2954b45040b54ec9300c3d34e44500a7b Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Fri, 17 Jun 2016 09:52:02 -0700 Subject: [PATCH] Address PR comments --- Compiler-Internals.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Compiler-Internals.md b/Compiler-Internals.md index 094375e..a6601c5 100644 --- a/Compiler-Internals.md +++ b/Compiler-Internals.md @@ -36,10 +36,14 @@ There aren't any surprises in the general implementation style here. ## JSDoc parsing +# Binder + # Checker The checker is almost 20,000 lines long, and does almost everything that's not syntactic. -Surprisingly, a checker gets created every time the language service requests information because it tries to present an immutable interface. +Since the semantics of a entire program can change dramatically with a couple of keystrokes (e.g. renaming a class), a new checker gets created every time the language service requests information. +Creating a checker is cheap, though, because the compiler as a whole is so lazy. +You just have to create some basic types and get the binder to build the global symbol table. ## Grammatical checking @@ -62,6 +66,3 @@ There is still a small printer that writes any AST back to text. ## Sourcemap generation # Language service - -The language service provides an API for clients to provide edit-time information about a program. -Point it at a directory and it will maintain compilation information about the source in that directory.