IVariableScope.cs 596 B

123456789101112131415161718192021222324
  1. using System.Collections.Generic;
  2. using Jint.Parser.Ast;
  3. namespace Jint.Parser
  4. {
  5. /// <summary>
  6. /// Used to safe references to all variable delcarations in a specific scope.
  7. /// Hoisting.
  8. /// </summary>
  9. public interface IVariableScope
  10. {
  11. IList<VariableDeclaration> VariableDeclarations { get; set; }
  12. }
  13. public class VariableScope : IVariableScope
  14. {
  15. public VariableScope()
  16. {
  17. VariableDeclarations = new List<VariableDeclaration>();
  18. }
  19. public IList<VariableDeclaration> VariableDeclarations { get; set; }
  20. }
  21. }