@speclynx/apidom-parser-adapter-yaml-1-2 5.2.5 → 5.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,11 +28,16 @@ const analyze = (cst, {
28
28
  const referenceManager = new _ReferenceManager.default();
29
29
 
30
30
  // Pass 1: CST -> YAML AST (direct cursor-based transformation)
31
- const yamlAst = (0, _CstTransformer.default)(cursor, {
32
- schema,
33
- sourceMap,
34
- referenceManager
35
- });
31
+ let yamlAst;
32
+ try {
33
+ yamlAst = (0, _CstTransformer.default)(cursor, {
34
+ schema,
35
+ sourceMap,
36
+ referenceManager
37
+ });
38
+ } finally {
39
+ cursor.delete();
40
+ }
36
41
 
37
42
  // Pass 2: YAML AST -> ApiDOM (direct transformation)
38
43
  return (0, _YamlAstTransformer.transformYamlAstToApiDOM)(yamlAst, {
@@ -20,11 +20,16 @@ const analyze = (cst, {
20
20
  const referenceManager = new YamlReferenceManager();
21
21
 
22
22
  // Pass 1: CST -> YAML AST (direct cursor-based transformation)
23
- const yamlAst = transformCstToYamlAst(cursor, {
24
- schema,
25
- sourceMap,
26
- referenceManager
27
- });
23
+ let yamlAst;
24
+ try {
25
+ yamlAst = transformCstToYamlAst(cursor, {
26
+ schema,
27
+ sourceMap,
28
+ referenceManager
29
+ });
30
+ } finally {
31
+ cursor.delete();
32
+ }
28
33
 
29
34
  // Pass 2: YAML AST -> ApiDOM (direct transformation)
30
35
  return transformYamlAstToApiDOM(yamlAst, {