@swagger-api/apidom-parser-adapter-json 0.92.0 → 0.93.0

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [0.93.0](https://github.com/swagger-api/apidom/compare/v0.92.0...v0.93.0) (2024-01-23)
7
+
8
+ **Note:** Version bump only for package @swagger-api/apidom-parser-adapter-json
9
+
6
10
  # [0.92.0](https://github.com/swagger-api/apidom/compare/v0.91.0...v0.92.0) (2024-01-12)
7
11
 
8
12
  **Note:** Version bump only for package @swagger-api/apidom-parser-adapter-json
@@ -19,17 +19,17 @@ const keyMap = exports.keyMap = {
19
19
 
20
20
  class CstVisitor {
21
21
  static toPosition(node) {
22
- const start = (0, _apidomAst.Point)({
22
+ const start = new _apidomAst.Point({
23
23
  row: node.startPosition.row,
24
24
  column: node.startPosition.column,
25
25
  char: node.startIndex
26
26
  });
27
- const end = (0, _apidomAst.Point)({
27
+ const end = new _apidomAst.Point({
28
28
  row: node.endPosition.row,
29
29
  column: node.endPosition.column,
30
30
  char: node.endIndex
31
31
  });
32
- return (0, _apidomAst.Position)({
32
+ return new _apidomAst.Position({
33
33
  start,
34
34
  end
35
35
  });
@@ -37,14 +37,14 @@ class CstVisitor {
37
37
  document = {
38
38
  enter: node => {
39
39
  const position = CstVisitor.toPosition(node);
40
- return (0, _apidomAst.JsonDocument)({
40
+ return new _apidomAst.JsonDocument({
41
41
  children: node.children,
42
42
  position,
43
43
  isMissing: node.isMissing
44
44
  });
45
45
  },
46
46
  leave: document => {
47
- return (0, _apidomAst.ParseResult)({
47
+ return new _apidomAst.ParseResult({
48
48
  children: [document]
49
49
  });
50
50
  }
@@ -57,7 +57,7 @@ class CstVisitor {
57
57
  const {
58
58
  isMissing
59
59
  } = node;
60
- return (0, _apidomAst.Literal)({
60
+ return new _apidomAst.Literal({
61
61
  value,
62
62
  position,
63
63
  isMissing
@@ -67,7 +67,7 @@ class CstVisitor {
67
67
  }
68
68
  object(node) {
69
69
  const position = CstVisitor.toPosition(node);
70
- return (0, _apidomAst.JsonObject)({
70
+ return new _apidomAst.JsonObject({
71
71
  children: node.children,
72
72
  position,
73
73
  isMissing: node.isMissing
@@ -79,12 +79,12 @@ class CstVisitor {
79
79
  const {
80
80
  keyNode
81
81
  } = node;
82
- const key = (0, _apidomAst.JsonKey)({
82
+ const key = new _apidomAst.JsonKey({
83
83
  children: (keyNode == null ? void 0 : keyNode.children) || [],
84
- position: keyNode != null ? CstVisitor.toPosition(keyNode) : null,
84
+ position: keyNode != null ? CstVisitor.toPosition(keyNode) : undefined,
85
85
  isMissing: keyNode != null ? keyNode.isMissing : false
86
86
  });
87
- return (0, _apidomAst.JsonProperty)({
87
+ return new _apidomAst.JsonProperty({
88
88
  children: [key, ...children],
89
89
  position,
90
90
  isMissing: node.isMissing
@@ -92,7 +92,7 @@ class CstVisitor {
92
92
  }
93
93
  array(node) {
94
94
  const position = CstVisitor.toPosition(node);
95
- return (0, _apidomAst.JsonArray)({
95
+ return new _apidomAst.JsonArray({
96
96
  children: node.children,
97
97
  position,
98
98
  isMissing: node.isMissing
@@ -100,10 +100,10 @@ class CstVisitor {
100
100
  }
101
101
  string(node) {
102
102
  const position = CstVisitor.toPosition(node);
103
- const content = (0, _apidomAst.JsonStringContent)({
103
+ const content = new _apidomAst.JsonStringContent({
104
104
  value: JSON.parse(node.text)
105
105
  });
106
- return (0, _apidomAst.JsonString)({
106
+ return new _apidomAst.JsonString({
107
107
  children: [content],
108
108
  position,
109
109
  isMissing: node.isMissing
@@ -112,7 +112,7 @@ class CstVisitor {
112
112
  number(node) {
113
113
  const position = CstVisitor.toPosition(node);
114
114
  const value = node.text;
115
- return (0, _apidomAst.JsonNumber)({
115
+ return new _apidomAst.JsonNumber({
116
116
  value,
117
117
  position,
118
118
  isMissing: node.isMissing
@@ -123,7 +123,7 @@ class CstVisitor {
123
123
  null(node) {
124
124
  const position = CstVisitor.toPosition(node);
125
125
  const value = node.text;
126
- return (0, _apidomAst.JsonNull)({
126
+ return new _apidomAst.JsonNull({
127
127
  value,
128
128
  position,
129
129
  isMissing: node.isMissing
@@ -134,7 +134,7 @@ class CstVisitor {
134
134
  true(node) {
135
135
  const position = CstVisitor.toPosition(node);
136
136
  const value = node.text;
137
- return (0, _apidomAst.JsonTrue)({
137
+ return new _apidomAst.JsonTrue({
138
138
  value,
139
139
  position,
140
140
  isMissing: node.isMissing
@@ -145,7 +145,7 @@ class CstVisitor {
145
145
  false(node) {
146
146
  const position = CstVisitor.toPosition(node);
147
147
  const value = node.text;
148
- return (0, _apidomAst.JsonFalse)({
148
+ return new _apidomAst.JsonFalse({
149
149
  value,
150
150
  position,
151
151
  isMissing: node.isMissing
@@ -153,7 +153,7 @@ class CstVisitor {
153
153
  }
154
154
  ERROR(node, key, parent, path) {
155
155
  const position = CstVisitor.toPosition(node);
156
- const errorNode = (0, _apidomAst.Error)({
156
+ const errorNode = new _apidomAst.Error({
157
157
  children: node.children,
158
158
  position,
159
159
  isUnexpected: !node.hasError,
@@ -161,7 +161,7 @@ class CstVisitor {
161
161
  value: node.text
162
162
  });
163
163
  if (path.length === 0) {
164
- return (0, _apidomAst.ParseResult)({
164
+ return new _apidomAst.ParseResult({
165
165
  children: [errorNode]
166
166
  });
167
167
  }