1 | // -*- c-basic-offset: 2 -*-
|
---|
2 | /*
|
---|
3 | * This file is part of the KDE libraries
|
---|
4 | * Copyright (C) 2002 Harri Porten ([email protected])
|
---|
5 | * Copyright (C) 2002 Apple Computer, Inc.
|
---|
6 | *
|
---|
7 | * This library is free software; you can redistribute it and/or
|
---|
8 | * modify it under the terms of the GNU Library General Public
|
---|
9 | * License as published by the Free Software Foundation; either
|
---|
10 | * version 2 of the License, or (at your option) any later version.
|
---|
11 | *
|
---|
12 | * This library is distributed in the hope that it will be useful,
|
---|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
15 | * Library General Public License for more details.
|
---|
16 | *
|
---|
17 | * You should have received a copy of the GNU Library General Public License
|
---|
18 | * along with this library; see the file COPYING.LIB. If not, write to
|
---|
19 | * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
---|
20 | * Boston, MA 02111-1307, USA.
|
---|
21 | *
|
---|
22 | */
|
---|
23 |
|
---|
24 | #include "nodes.h"
|
---|
25 |
|
---|
26 | namespace KJS {
|
---|
27 | /**
|
---|
28 | * A simple text streaming class that helps with code indentation.
|
---|
29 | */
|
---|
30 | class SourceStream {
|
---|
31 | public:
|
---|
32 | enum Format {
|
---|
33 | Endl, Indent, Unindent
|
---|
34 | };
|
---|
35 |
|
---|
36 | UString toString() const { return str; }
|
---|
37 | SourceStream& operator<<(const Identifier &);
|
---|
38 | SourceStream& operator<<(const UString &);
|
---|
39 | SourceStream& operator<<(const char *);
|
---|
40 | SourceStream& operator<<(char);
|
---|
41 | SourceStream& operator<<(Format f);
|
---|
42 | SourceStream& operator<<(const Node *);
|
---|
43 | private:
|
---|
44 | UString str; /* TODO: buffer */
|
---|
45 | UString ind;
|
---|
46 | };
|
---|
47 | };
|
---|
48 |
|
---|
49 | using namespace KJS;
|
---|
50 |
|
---|
51 | SourceStream& SourceStream::operator<<(char c)
|
---|
52 | {
|
---|
53 | str += UString(c);
|
---|
54 | return *this;
|
---|
55 | }
|
---|
56 |
|
---|
57 | SourceStream& SourceStream::operator<<(const char *s)
|
---|
58 | {
|
---|
59 | str += UString(s);
|
---|
60 | return *this;
|
---|
61 | }
|
---|
62 |
|
---|
63 | SourceStream& SourceStream::operator<<(const UString &s)
|
---|
64 | {
|
---|
65 | str += s;
|
---|
66 | return *this;
|
---|
67 | }
|
---|
68 |
|
---|
69 | SourceStream& SourceStream::operator<<(const Identifier &s)
|
---|
70 | {
|
---|
71 | str += s.ustring();
|
---|
72 | return *this;
|
---|
73 | }
|
---|
74 |
|
---|
75 | SourceStream& SourceStream::operator<<(const Node *n)
|
---|
76 | {
|
---|
77 | if (n)
|
---|
78 | n->streamTo(*this);
|
---|
79 | return *this;
|
---|
80 | }
|
---|
81 |
|
---|
82 | SourceStream& SourceStream::operator<<(Format f)
|
---|
83 | {
|
---|
84 | if (f == Endl)
|
---|
85 | str += "\n" + ind;
|
---|
86 | else if (f == Indent)
|
---|
87 | ind += " ";
|
---|
88 | else
|
---|
89 | ind = ind.substr(0, ind.size() - 2);
|
---|
90 |
|
---|
91 | return *this;
|
---|
92 | }
|
---|
93 |
|
---|
94 | UString Node::toString() const
|
---|
95 | {
|
---|
96 | SourceStream str;
|
---|
97 | streamTo(str);
|
---|
98 |
|
---|
99 | return str.toString();
|
---|
100 | }
|
---|
101 |
|
---|
102 | void NullNode::streamTo(SourceStream &s) const { s << "null"; }
|
---|
103 |
|
---|
104 | void BooleanNode::streamTo(SourceStream &s) const
|
---|
105 | {
|
---|
106 | s << (value ? "true" : "false");
|
---|
107 | }
|
---|
108 |
|
---|
109 | void NumberNode::streamTo(SourceStream &s) const { s << UString::from(value); }
|
---|
110 |
|
---|
111 | void StringNode::streamTo(SourceStream &s) const
|
---|
112 | {
|
---|
113 | s << '"' << value << '"';
|
---|
114 | }
|
---|
115 |
|
---|
116 | void RegExpNode::streamTo(SourceStream &s) const { s << pattern; }
|
---|
117 |
|
---|
118 | void ThisNode::streamTo(SourceStream &s) const { s << "this"; }
|
---|
119 |
|
---|
120 | void ResolveNode::streamTo(SourceStream &s) const { s << ident; }
|
---|
121 |
|
---|
122 | void ElisionNode::streamTo(SourceStream &s) const
|
---|
123 | {
|
---|
124 | if (elision)
|
---|
125 | s << elision << ",";
|
---|
126 | else
|
---|
127 | s << ",";
|
---|
128 | }
|
---|
129 |
|
---|
130 | void ElementNode::streamTo(SourceStream &s) const
|
---|
131 | {
|
---|
132 | if (list)
|
---|
133 | s << list << ",";
|
---|
134 | s << elision << node;
|
---|
135 | }
|
---|
136 |
|
---|
137 | void ArrayNode::streamTo(SourceStream &s) const
|
---|
138 | {
|
---|
139 | s << "[" << element << elision << "]";
|
---|
140 | }
|
---|
141 |
|
---|
142 | void ObjectLiteralNode::streamTo(SourceStream &s) const
|
---|
143 | {
|
---|
144 | if (list)
|
---|
145 | s << "{ " << list << " }";
|
---|
146 | else
|
---|
147 | s << "{ }";
|
---|
148 | }
|
---|
149 |
|
---|
150 | void PropertyValueNode::streamTo(SourceStream &s) const
|
---|
151 | {
|
---|
152 | if (list)
|
---|
153 | s << list << ", ";
|
---|
154 | s << name << ": " << assign;
|
---|
155 | }
|
---|
156 |
|
---|
157 | void PropertyNode::streamTo(SourceStream &s) const
|
---|
158 | {
|
---|
159 | if (str.isNull())
|
---|
160 | s << UString::from(numeric);
|
---|
161 | else
|
---|
162 | s << str;
|
---|
163 | }
|
---|
164 |
|
---|
165 | void AccessorNode1::streamTo(SourceStream &s) const
|
---|
166 | {
|
---|
167 | s << expr1 << "[" << expr2 << "]";
|
---|
168 | }
|
---|
169 |
|
---|
170 | void AccessorNode2::streamTo(SourceStream &s) const
|
---|
171 | {
|
---|
172 | s << expr << "." << ident;
|
---|
173 | }
|
---|
174 |
|
---|
175 | void ArgumentListNode::streamTo(SourceStream &s) const
|
---|
176 | {
|
---|
177 | if (list)
|
---|
178 | s << list << ", ";
|
---|
179 | s << expr;
|
---|
180 | }
|
---|
181 |
|
---|
182 | void ArgumentsNode::streamTo(SourceStream &s) const
|
---|
183 | {
|
---|
184 | s << "(" << list << ")";
|
---|
185 | }
|
---|
186 |
|
---|
187 | void NewExprNode::streamTo(SourceStream &s) const
|
---|
188 | {
|
---|
189 | s << "new " << expr << args;
|
---|
190 | }
|
---|
191 |
|
---|
192 | void FunctionCallNode::streamTo(SourceStream &s) const
|
---|
193 | {
|
---|
194 | s << expr << args;
|
---|
195 | }
|
---|
196 |
|
---|
197 | void PostfixNode::streamTo(SourceStream &s) const
|
---|
198 | {
|
---|
199 | s << expr;
|
---|
200 | if (oper == OpPlusPlus)
|
---|
201 | s << "++";
|
---|
202 | else
|
---|
203 | s << "--";
|
---|
204 | }
|
---|
205 |
|
---|
206 | void DeleteNode::streamTo(SourceStream &s) const
|
---|
207 | {
|
---|
208 | s << "delete " << expr;
|
---|
209 | }
|
---|
210 |
|
---|
211 | void VoidNode::streamTo(SourceStream &s) const
|
---|
212 | {
|
---|
213 | s << "void " << expr;
|
---|
214 | }
|
---|
215 |
|
---|
216 | void TypeOfNode::streamTo(SourceStream &s) const
|
---|
217 | {
|
---|
218 | s << "typeof " << expr;
|
---|
219 | }
|
---|
220 |
|
---|
221 | void PrefixNode::streamTo(SourceStream &s) const
|
---|
222 | {
|
---|
223 | s << expr << (oper == OpPlusPlus ? "++" : "--");
|
---|
224 | }
|
---|
225 |
|
---|
226 | void UnaryPlusNode::streamTo(SourceStream &s) const
|
---|
227 | {
|
---|
228 | s << "+" << expr;
|
---|
229 | }
|
---|
230 |
|
---|
231 | void NegateNode::streamTo(SourceStream &s) const
|
---|
232 | {
|
---|
233 | s << "-" << expr;
|
---|
234 | }
|
---|
235 |
|
---|
236 | void BitwiseNotNode::streamTo(SourceStream &s) const
|
---|
237 | {
|
---|
238 | s << "~" << expr;
|
---|
239 | }
|
---|
240 |
|
---|
241 | void LogicalNotNode::streamTo(SourceStream &s) const
|
---|
242 | {
|
---|
243 | s << "!" << expr;
|
---|
244 | }
|
---|
245 |
|
---|
246 | void MultNode::streamTo(SourceStream &s) const
|
---|
247 | {
|
---|
248 | s << term1 << oper << term2;
|
---|
249 | }
|
---|
250 |
|
---|
251 | void AddNode::streamTo(SourceStream &s) const
|
---|
252 | {
|
---|
253 | s << term1 << oper << term2;
|
---|
254 | }
|
---|
255 |
|
---|
256 | void ShiftNode::streamTo(SourceStream &s) const
|
---|
257 | {
|
---|
258 | s << term1;
|
---|
259 | if (oper == OpLShift)
|
---|
260 | s << "<<";
|
---|
261 | else if (oper == OpRShift)
|
---|
262 | s << ">>";
|
---|
263 | else
|
---|
264 | s << ">>>";
|
---|
265 | s << term2;
|
---|
266 | }
|
---|
267 |
|
---|
268 | void RelationalNode::streamTo(SourceStream &s) const
|
---|
269 | {
|
---|
270 | s << expr1;
|
---|
271 | switch (oper) {
|
---|
272 | case OpLess:
|
---|
273 | s << " < ";
|
---|
274 | break;
|
---|
275 | case OpGreater:
|
---|
276 | s << " > ";
|
---|
277 | break;
|
---|
278 | case OpLessEq:
|
---|
279 | s << " <= ";
|
---|
280 | break;
|
---|
281 | case OpGreaterEq:
|
---|
282 | s << " >= ";
|
---|
283 | break;
|
---|
284 | case OpInstanceOf:
|
---|
285 | s << " instanceof ";
|
---|
286 | break;
|
---|
287 | case OpIn:
|
---|
288 | s << " in ";
|
---|
289 | break;
|
---|
290 | default:
|
---|
291 | ;
|
---|
292 | }
|
---|
293 | s << expr2;
|
---|
294 | }
|
---|
295 |
|
---|
296 | void EqualNode::streamTo(SourceStream &s) const
|
---|
297 | {
|
---|
298 | s << expr1;
|
---|
299 | switch (oper) {
|
---|
300 | case OpEqEq:
|
---|
301 | s << " == ";
|
---|
302 | break;
|
---|
303 | case OpNotEq:
|
---|
304 | s << " != ";
|
---|
305 | break;
|
---|
306 | case OpStrEq:
|
---|
307 | s << " === ";
|
---|
308 | break;
|
---|
309 | case OpStrNEq:
|
---|
310 | s << " !== ";
|
---|
311 | break;
|
---|
312 | default:
|
---|
313 | ;
|
---|
314 | }
|
---|
315 | s << expr2;
|
---|
316 | }
|
---|
317 |
|
---|
318 | void BitOperNode::streamTo(SourceStream &s) const
|
---|
319 | {
|
---|
320 | s << expr1;
|
---|
321 | if (oper == OpBitAnd)
|
---|
322 | s << " & ";
|
---|
323 | else if (oper == OpBitXOr)
|
---|
324 | s << " ^ ";
|
---|
325 | else
|
---|
326 | s << " | ";
|
---|
327 | s << expr2;
|
---|
328 | }
|
---|
329 |
|
---|
330 | void BinaryLogicalNode::streamTo(SourceStream &s) const
|
---|
331 | {
|
---|
332 | s << expr1 << (oper == OpAnd ? " && " : " || ") << expr2;
|
---|
333 | }
|
---|
334 |
|
---|
335 | void ConditionalNode::streamTo(SourceStream &s) const
|
---|
336 | {
|
---|
337 | s << logical << " ? " << expr1 << " : " << expr2;
|
---|
338 | }
|
---|
339 |
|
---|
340 | void AssignNode::streamTo(SourceStream &s) const
|
---|
341 | {
|
---|
342 | s << left;
|
---|
343 | const char *opStr;
|
---|
344 | switch (oper) {
|
---|
345 | case OpEqual:
|
---|
346 | opStr = " = ";
|
---|
347 | break;
|
---|
348 | case OpMultEq:
|
---|
349 | opStr = " *= ";
|
---|
350 | break;
|
---|
351 | case OpDivEq:
|
---|
352 | opStr = " /= ";
|
---|
353 | break;
|
---|
354 | case OpPlusEq:
|
---|
355 | opStr = " += ";
|
---|
356 | break;
|
---|
357 | case OpMinusEq:
|
---|
358 | opStr = " -= ";
|
---|
359 | break;
|
---|
360 | case OpLShift:
|
---|
361 | opStr = " <<= ";
|
---|
362 | break;
|
---|
363 | case OpRShift:
|
---|
364 | opStr = " >>= ";
|
---|
365 | break;
|
---|
366 | case OpURShift:
|
---|
367 | opStr = " >>= ";
|
---|
368 | break;
|
---|
369 | case OpAndEq:
|
---|
370 | opStr = " &= ";
|
---|
371 | break;
|
---|
372 | case OpXOrEq:
|
---|
373 | opStr = " ^= ";
|
---|
374 | break;
|
---|
375 | case OpOrEq:
|
---|
376 | opStr = " |= ";
|
---|
377 | break;
|
---|
378 | case OpModEq:
|
---|
379 | opStr = " %= ";
|
---|
380 | break;
|
---|
381 | default:
|
---|
382 | opStr = " ?= ";
|
---|
383 | }
|
---|
384 | s << opStr << expr;
|
---|
385 | }
|
---|
386 |
|
---|
387 | void CommaNode::streamTo(SourceStream &s) const
|
---|
388 | {
|
---|
389 | s << expr1 << ", " << expr2;
|
---|
390 | }
|
---|
391 |
|
---|
392 | void StatListNode::streamTo(SourceStream &s) const
|
---|
393 | {
|
---|
394 | s << list << statement;
|
---|
395 | }
|
---|
396 |
|
---|
397 | void AssignExprNode::streamTo(SourceStream &s) const
|
---|
398 | {
|
---|
399 | s << " = " << expr;
|
---|
400 | }
|
---|
401 |
|
---|
402 | void VarDeclNode::streamTo(SourceStream &s) const
|
---|
403 | {
|
---|
404 | s << ident << init;
|
---|
405 | }
|
---|
406 |
|
---|
407 | void VarDeclListNode::streamTo(SourceStream &s) const
|
---|
408 | {
|
---|
409 | if (list)
|
---|
410 | s << list << ", ";
|
---|
411 | s << var;
|
---|
412 | }
|
---|
413 |
|
---|
414 | void VarStatementNode::streamTo(SourceStream &s) const
|
---|
415 | {
|
---|
416 | s << SourceStream::Endl << "var " << list << ";";
|
---|
417 | }
|
---|
418 |
|
---|
419 | void BlockNode::streamTo(SourceStream &s) const
|
---|
420 | {
|
---|
421 | s << SourceStream::Endl << "{" << SourceStream::Indent
|
---|
422 | << source << SourceStream::Unindent << SourceStream::Endl << "}";
|
---|
423 | }
|
---|
424 |
|
---|
425 | void EmptyStatementNode::streamTo(SourceStream &s) const
|
---|
426 | {
|
---|
427 | s << SourceStream::Endl << ";";
|
---|
428 | }
|
---|
429 |
|
---|
430 | void ExprStatementNode::streamTo(SourceStream &s) const
|
---|
431 | {
|
---|
432 | s << SourceStream::Endl << expr << ";";
|
---|
433 | }
|
---|
434 |
|
---|
435 | void IfNode::streamTo(SourceStream &s) const
|
---|
436 | {
|
---|
437 | s << SourceStream::Endl << "if (" << expr << ")" << SourceStream::Indent
|
---|
438 | << statement1 << SourceStream::Unindent;
|
---|
439 | if (statement2)
|
---|
440 | s << SourceStream::Endl << "else" << SourceStream::Indent
|
---|
441 | << statement2 << SourceStream::Unindent;
|
---|
442 | }
|
---|
443 |
|
---|
444 | void DoWhileNode::streamTo(SourceStream &s) const
|
---|
445 | {
|
---|
446 | s << SourceStream::Endl << "do " << SourceStream::Indent
|
---|
447 | << statement << SourceStream::Unindent << SourceStream::Endl
|
---|
448 | << "while (" << expr << ");";
|
---|
449 | }
|
---|
450 |
|
---|
451 | void WhileNode::streamTo(SourceStream &s) const
|
---|
452 | {
|
---|
453 | s << SourceStream::Endl << "while (" << expr << ")" << SourceStream::Indent
|
---|
454 | << statement << SourceStream::Unindent;
|
---|
455 | }
|
---|
456 |
|
---|
457 | void ForNode::streamTo(SourceStream &s) const
|
---|
458 | {
|
---|
459 | s << SourceStream::Endl << "for ("
|
---|
460 | << expr1 // TODO: doesn't properly do "var i = 0"
|
---|
461 | << "; " << expr2
|
---|
462 | << "; " << expr3
|
---|
463 | << ")" << SourceStream::Indent << statement << SourceStream::Unindent;
|
---|
464 | }
|
---|
465 |
|
---|
466 | void ForInNode::streamTo(SourceStream &s) const
|
---|
467 | {
|
---|
468 | s << SourceStream::Endl << "for (";
|
---|
469 | if (varDecl)
|
---|
470 | s << "var " << varDecl;
|
---|
471 | if (init)
|
---|
472 | s << " = " << init;
|
---|
473 | s << " in " << expr << ")" << SourceStream::Indent
|
---|
474 | << statement << SourceStream::Unindent;
|
---|
475 | }
|
---|
476 |
|
---|
477 | void ContinueNode::streamTo(SourceStream &s) const
|
---|
478 | {
|
---|
479 | s << SourceStream::Endl << "continue";
|
---|
480 | if (!ident.isNull())
|
---|
481 | s << " " << ident;
|
---|
482 | s << ";";
|
---|
483 | }
|
---|
484 |
|
---|
485 | void BreakNode::streamTo(SourceStream &s) const
|
---|
486 | {
|
---|
487 | s << SourceStream::Endl << "break";
|
---|
488 | if (!ident.isNull())
|
---|
489 | s << " " << ident;
|
---|
490 | s << ";";
|
---|
491 | }
|
---|
492 |
|
---|
493 | void ReturnNode::streamTo(SourceStream &s) const
|
---|
494 | {
|
---|
495 | s << SourceStream::Endl << "return";
|
---|
496 | if (value)
|
---|
497 | s << " " << value;
|
---|
498 | s << ";";
|
---|
499 | }
|
---|
500 |
|
---|
501 | void WithNode::streamTo(SourceStream &s) const
|
---|
502 | {
|
---|
503 | s << SourceStream::Endl << "with (" << expr << ") "
|
---|
504 | << statement;
|
---|
505 | }
|
---|
506 |
|
---|
507 | void CaseClauseNode::streamTo(SourceStream &s) const
|
---|
508 | {
|
---|
509 | s << SourceStream::Endl;
|
---|
510 | if (expr)
|
---|
511 | s << "case " << expr;
|
---|
512 | else
|
---|
513 | s << "default";
|
---|
514 | s << ":" << SourceStream::Indent;
|
---|
515 | if (list)
|
---|
516 | s << list;
|
---|
517 | s << SourceStream::Unindent;
|
---|
518 | }
|
---|
519 |
|
---|
520 | void ClauseListNode::streamTo(SourceStream &s) const
|
---|
521 | {
|
---|
522 | const ClauseListNode *l = this;
|
---|
523 | do {
|
---|
524 | s << l;
|
---|
525 | l = l->nx;
|
---|
526 | } while (l);
|
---|
527 | }
|
---|
528 |
|
---|
529 | void CaseBlockNode::streamTo(SourceStream &s) const
|
---|
530 | {
|
---|
531 | const ClauseListNode *cl = list1;
|
---|
532 | while (cl) {
|
---|
533 | s << cl->clause();
|
---|
534 | cl = cl->next();
|
---|
535 | }
|
---|
536 | if (def)
|
---|
537 | s << def;
|
---|
538 | cl = list2;
|
---|
539 | while (cl) {
|
---|
540 | s << cl->clause();
|
---|
541 | cl = cl->next();
|
---|
542 | }
|
---|
543 | }
|
---|
544 |
|
---|
545 | void SwitchNode::streamTo(SourceStream &s) const
|
---|
546 | {
|
---|
547 | s << SourceStream::Endl << "switch (" << expr << ") {"
|
---|
548 | << SourceStream::Indent << block << SourceStream::Unindent
|
---|
549 | << SourceStream::Endl << "}";
|
---|
550 | }
|
---|
551 |
|
---|
552 | void LabelNode::streamTo(SourceStream &s) const
|
---|
553 | {
|
---|
554 | s << SourceStream::Endl << label << ":" << SourceStream::Indent
|
---|
555 | << statement << SourceStream::Unindent;
|
---|
556 | }
|
---|
557 |
|
---|
558 | void ThrowNode::streamTo(SourceStream &s) const
|
---|
559 | {
|
---|
560 | s << SourceStream::Endl << "throw " << expr << ";";
|
---|
561 | }
|
---|
562 |
|
---|
563 | void CatchNode::streamTo(SourceStream &s) const
|
---|
564 | {
|
---|
565 | s << SourceStream::Endl << "catch (" << ident << ")" << block;
|
---|
566 | }
|
---|
567 |
|
---|
568 | void FinallyNode::streamTo(SourceStream &s) const
|
---|
569 | {
|
---|
570 | s << SourceStream::Endl << "finally " << block;
|
---|
571 | }
|
---|
572 |
|
---|
573 | void TryNode::streamTo(SourceStream &s) const
|
---|
574 | {
|
---|
575 | s << "try " << block
|
---|
576 | << _catch
|
---|
577 | << _final;
|
---|
578 | }
|
---|
579 |
|
---|
580 | void ParameterNode::streamTo(SourceStream &s) const
|
---|
581 | {
|
---|
582 | s << id;
|
---|
583 | if (next)
|
---|
584 | s << ", " << next;
|
---|
585 | }
|
---|
586 |
|
---|
587 | void FunctionBodyNode::streamTo(SourceStream &s) const {
|
---|
588 | s << SourceStream::Endl << "{" << SourceStream::Indent
|
---|
589 | << source << SourceStream::Unindent << SourceStream::Endl << "}";
|
---|
590 | }
|
---|
591 |
|
---|
592 | void FuncDeclNode::streamTo(SourceStream &s) const {
|
---|
593 | s << "function " << ident << "(";
|
---|
594 | if (param)
|
---|
595 | s << param;
|
---|
596 | s << ")" << body;
|
---|
597 | }
|
---|
598 |
|
---|
599 | void FuncExprNode::streamTo(SourceStream &s) const
|
---|
600 | {
|
---|
601 | s << "function " << "("
|
---|
602 | << param
|
---|
603 | << ")" << body;
|
---|
604 | }
|
---|
605 |
|
---|
606 | void SourceElementNode::streamTo(SourceStream &s) const
|
---|
607 | {
|
---|
608 | if (statement)
|
---|
609 | s << statement;
|
---|
610 | else
|
---|
611 | s << function;
|
---|
612 | }
|
---|
613 |
|
---|
614 | void SourceElementsNode::streamTo(SourceStream &s) const
|
---|
615 | {
|
---|
616 | s << elements << element;
|
---|
617 | }
|
---|
618 |
|
---|