WritingACompilerInGoisthesequeltoWritingAnInterpreterInGo.Itstartsrightwherethefirstonestopped,withafully-working,fully-testedMonkeyinterpreterinhand,connectingbothbooksseamlessly,readytobuildacompilerandavirtualmachineforMonkey.Inthisbook,weusethecodebase(includedinthebook!)fromthefirstpartandextendit.Wetakethelexer,theparser,theAST,theREPLandtheobjectsystemandusethemtobuildanew,fasterimplementationofMonkey,rightnexttothetree-walkingevaluatorwebuiltinthefirstbook.Theapproachisunchanged,too.Working,testedcodeisthefocus,webuildeverythingfromscratch,dobabysteps,writetestsfirsts,useno3rd-party-librariesandseeandunderstandhowallthepiecesfittogether.It'sacontinuationinproseandincode.
1