DebugScopeType.cs 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. namespace Jint.Runtime.Debugger
  2. {
  3. /// <summary>
  4. /// Variable scope type.
  5. /// These mirror <see href="https://chromedevtools.github.io/devtools-protocol/tot/Debugger/#type-Scope">Chrome DevTools Protocol</see>.
  6. /// </summary>
  7. public enum DebugScopeType
  8. {
  9. /// <summary>
  10. /// Global scope bindings.
  11. /// </summary>
  12. /// <remarks>
  13. /// A scope chain will only include one scope of this type.
  14. /// </remarks>
  15. Global,
  16. /// <summary>
  17. /// Block scope bindings (let/const) defined at top level.
  18. /// </summary>
  19. /// <remarks>
  20. /// A scope chain will only include one scope of this type.
  21. /// </remarks>
  22. Script,
  23. /// <summary>
  24. /// Function local bindings.
  25. /// </summary>
  26. /// <remarks>
  27. /// Function scoped variables.
  28. /// Note that variables in outer functions are in <see cref="Closure"/> scopes.
  29. /// A scope chain will only include one scope of this type.
  30. /// </remarks>
  31. Local,
  32. /// <summary>
  33. /// Block scoped bindings.
  34. /// </summary>
  35. /// <remarks>
  36. /// This scope is not used for block scoped variables (let/const) declared at the top level of the <see cref="Global">global</see> scope.
  37. /// Unlike Chromium V8, it *is* used as a separate scope for block scoped variables declared at the top level of a function.
  38. /// A scope chain may include more than one scope of this type.
  39. /// </remarks>
  40. Block,
  41. /// <summary>
  42. /// Catch scope bindings.
  43. /// </summary>
  44. /// <remarks>
  45. /// This scope only includes the argument of a <c>catch</c> clause in a <c>try/catch</c> statement.
  46. /// A scope chain may include more than one scope of this type.
  47. /// </remarks>
  48. Catch,
  49. /// <summary>
  50. /// Function scope bindings in outer functions.
  51. /// </summary>
  52. /// <remarks>
  53. /// Unlike Chromium V8, which will optimize variables out that aren't referenced from the inner scope,
  54. /// Jint includes local variables from the outer function in this scope.
  55. /// A scope chain may include more than one scope of this type.
  56. /// </remarks>
  57. Closure,
  58. /// <summary>
  59. /// With scope bindings.
  60. /// </summary>
  61. /// <remarks>
  62. /// Includes the bindings created from properties of object used as argument to a <c>with</c> statement.
  63. /// A scope chain may include more than one scope of this type.
  64. /// </remarks>
  65. With,
  66. /// <summary>
  67. /// Eval scope bindings.
  68. /// </summary>
  69. /// <remarks>Variables declared in an evaluated string. Not implemented.</remarks>
  70. Eval,
  71. /// <summary>
  72. /// Module scope bindings.
  73. /// </summary>
  74. /// <remarks>Not currently implemented by Jint.</remarks>
  75. Module,
  76. /// <summary>
  77. /// WebAssembly expression stack bindings.
  78. /// </summary>
  79. /// <remarks>Not currently implemented by Jint.</remarks>
  80. WasmExpressionStack
  81. }
  82. }