Exemple #1
0
 /// <summary>
 /// Carries out identification on a let command node
 /// </summary>
 /// <param name="letCommand">The node to perform identification on</param>
 private void PerformIdentificationOnLetCommand(LetCommandNode letCommand)
 {
     SymbolTable.OpenScope();
     PerformIdentification(letCommand.Declaration);
     PerformIdentification(letCommand.Command);
     SymbolTable.CloseScope();
 }
Exemple #2
0
 /// <summary>
 /// Generates code for a let command node
 /// </summary>
 /// <param name="letCommand">The node to generate code for</param>
 private void GenerateCodeForLetCommand(LetCommandNode letCommand)
 {
     Debugger.Write("Generating code for Let Command");
     scopes.AddScope();
     GenerateCodeFor(letCommand.Declaration);
     GenerateCodeFor(letCommand.Command);
     code.AddInstruction(OpCode.POP, 0, 0, scopes.GetLocalScopeSize());
     scopes.RemoveScope();
 }