@@ -79,7 +79,7 @@ Local<Object> v8ElementCollection(const InfoElements& collection,
7979 value = ElementToObject (el.second .get (), sourcemap);
8080 }
8181
82- result-> Set (key, value);
82+ Nan:: Set (result, key, value);
8383 }
8484
8585 return result;
@@ -88,9 +88,9 @@ Local<Object> v8ElementCollection(const InfoElements& collection,
8888Local<Object> v8Element (const IElement& e, bool sourcemap)
8989{
9090 Local<Object> res = Nan::New<Object>();
91- res-> Set (v8_string (" element" ), v8_string (e.element ()));
91+ Nan:: Set (res, v8_string (" element" ), v8_string (e.element ()));
9292 if (e.meta ().size () > 0 ) {
93- res-> Set (v8_string (" meta" ), v8ElementCollection (e.meta (), sourcemap));
93+ Nan:: Set (res, v8_string (" meta" ), v8ElementCollection (e.meta (), sourcemap));
9494 }
9595
9696 if (e.element () == " annotation" ) {
@@ -103,7 +103,7 @@ Local<Object> v8Element(const IElement& e, bool sourcemap)
103103 if (!maybeProps.IsEmpty ()) {
104104 Local<Array> props = maybeProps.ToLocalChecked ();
105105 if (props->Length () > 0 ) {
106- res-> Set (v8_string (" attributes" ), attrs);
106+ Nan:: Set (res, v8_string (" attributes" ), attrs);
107107 }
108108 }
109109 }
@@ -120,11 +120,11 @@ Local<Object> v8ValueList(const T& e, bool sourcemap)
120120 Local<Array> array = Nan::New<Array>();
121121
122122 for (const auto & el : e.get ()) {
123- array-> Set (i, ElementToObject (el.get (), sourcemap));
123+ Nan:: Set (array, i, ElementToObject (el.get (), sourcemap));
124124 ++i;
125125 }
126126
127- obj-> Set (v8_string (" content" ), array);
127+ Nan:: Set (obj, v8_string (" content" ), array);
128128 }
129129
130130 return obj;
@@ -134,23 +134,23 @@ Local<Value> v8RefElement(const RefElement& e, bool sourcemap)
134134{
135135 Local<Object> obj = v8Element (e, sourcemap);
136136
137- obj-> Set (v8_string (" content" ), v8_string (e.get ().symbol ()));
137+ Nan:: Set (obj, v8_string (" content" ), v8_string (e.get ().symbol ()));
138138
139139 return obj;
140140}
141141
142142void v8Wrapper::operator ()(const NullElement& e)
143143{
144144 Local<Object> obj = v8Element (e, sourcemap);
145- obj-> Set (v8_string (" content" ), Nan::Null ());
145+ Nan:: Set (obj, v8_string (" content" ), Nan::Null ());
146146 v8_value = obj;
147147}
148148
149149void v8Wrapper::operator ()(const StringElement& e)
150150{
151151 Local<Object> obj = v8Element (e, sourcemap);
152152 if (!e.empty ()) {
153- obj-> Set (v8_string (" content" ), v8_string (e.get ().get ()));
153+ Nan:: Set (obj, v8_string (" content" ), v8_string (e.get ().get ()));
154154 }
155155 v8_value = obj;
156156}
@@ -160,7 +160,7 @@ void v8Wrapper::operator()(const NumberElement& e)
160160 Local<Object> obj = v8Element (e, sourcemap);
161161 if (!e.empty ()) {
162162 Nan::JSON NanJSON;
163- obj-> Set (v8_string (" content" ),
163+ Nan:: Set (obj, v8_string (" content" ),
164164 NanJSON.Parse (v8_string (e.get ().get ())).ToLocalChecked ());
165165 }
166166 v8_value = obj;
@@ -170,7 +170,7 @@ void v8Wrapper::operator()(const BooleanElement& e)
170170{
171171 Local<Object> obj = v8Element (e, sourcemap);
172172 if (!e.empty ()) {
173- obj-> Set (v8_string (" content" ), Nan::New<Boolean>(e.get ()));
173+ Nan:: Set (obj, v8_string (" content" ), Nan::New<Boolean>(e.get ()));
174174 }
175175 v8_value = obj;
176176}
@@ -190,9 +190,9 @@ void v8Wrapper::operator()(const MemberElement& e)
190190 }
191191
192192 Local<Object> obj = v8Element (e, sourcemap);
193- content-> Set (v8_string (" key" ), key);
194- content-> Set (v8_string (" value" ), value);
195- obj-> Set (v8_string (" content" ), content);
193+ Nan:: Set (content, v8_string (" key" ), key);
194+ Nan:: Set (content, v8_string (" value" ), value);
195+ Nan:: Set (obj, v8_string (" content" ), content);
196196 v8_value = obj;
197197}
198198
@@ -207,15 +207,15 @@ void v8Wrapper::operator()(const ArrayElement& e)
207207 size_t i = 0 ;
208208 for (const auto & el : val->get ()) {
209209 if (el) {
210- array-> Set (i, ElementToObject (el.get (), sourcemap));
210+ Nan:: Set (array, i, ElementToObject (el.get (), sourcemap));
211211 }
212212 ++i;
213213 }
214214 }
215215
216216 Local<Object> res = v8Element (e, sourcemap);
217217 if (!e.empty ()) {
218- res-> Set (v8_string (" content" ), array);
218+ Nan:: Set (res, v8_string (" content" ), array);
219219 }
220220 v8_value = res;
221221}
@@ -225,7 +225,7 @@ void v8Wrapper::operator()(const EnumElement& e)
225225 Local<Object> obj = v8Element (e, sourcemap);
226226
227227 if (!e.empty ()) {
228- obj-> Set (v8_string (" content" ),
228+ Nan:: Set (obj, v8_string (" content" ),
229229 ElementToObject (e.get ().value (), sourcemap));
230230 }
231231
@@ -257,7 +257,7 @@ void v8Wrapper::operator()(const HolderElement& e)
257257 Local<Object> obj = v8Element (e, sourcemap);
258258
259259 if (!e.empty ()) {
260- obj-> Set (v8_string (" content" ),
260+ Nan:: Set (obj, v8_string (" content" ),
261261 ElementToObject (e.get ().data (), sourcemap));
262262 }
263263
@@ -273,11 +273,11 @@ void v8Wrapper::operator()(const ObjectElement& e)
273273 size_t i = 0 ;
274274
275275 for (const auto & el : e.get ()) {
276- array-> Set (i, ElementToObject (el.get (), sourcemap));
276+ Nan:: Set (array, i, ElementToObject (el.get (), sourcemap));
277277 ++i;
278278 }
279279
280- obj-> Set (v8_string (" content" ), array);
280+ Nan:: Set (obj, v8_string (" content" ), array);
281281 }
282282
283283 v8_value = obj;
@@ -310,14 +310,14 @@ Local<Value> annotations2v8(const IElement* res)
310310 for (std::vector<const IElement*>::const_iterator it = elements.begin ();
311311 it != elements.end (); ++i, ++it) {
312312 if (*it) {
313- array-> Set (i, ElementToObject (*it, true ));
313+ Nan:: Set (array, i, ElementToObject (*it, true ));
314314 }
315315 }
316316
317317 Local<Object> annotations = Nan::New<Object>();
318- annotations-> Set (v8_string (" element" ),
318+ Nan:: Set (annotations, v8_string (" element" ),
319319 v8_string (drafter::SerializeKey::ParseResult));
320- annotations-> Set (v8_string (" content" ), array);
320+ Nan:: Set (annotations, v8_string (" content" ), array);
321321 return annotations;
322322 }
323323
0 commit comments