1 using System;
2 using System.Collections;
3 using System.Windows;
4 using System.Lex;
5 using Cm.Ast;
6
7 class SyntaxNodeAttributeExtractor : Visitor
8 {
9 public SyntaxNodeAttributeExtractor() : s(), span()
10 {
11 }
12 private void AddLineAttribute()
13 {
14 if (!s.IsEmpty())
15 {
16 s.Append("\n");
17 }
18 s.Append("line: ").Append(System.ToString(span.line));
19 }
20 private void AddSpecifiersAttribute()
21 {
22 if (!s.IsEmpty())
23 {
24 s.Append("\n");
25 }
26 s.Append("specifiers: ").Append(SpecifierStr(specifiers));
27 }
28 private void AddGroupIdAttribute()
29 {
30 if (!s.IsEmpty())
31 {
32 s.Append("\n");
33 }
34 s.Append("group ID: ").Append(groupId);
35 }
36 private void AddTextAttribute()
37 {
38 if (!s.IsEmpty())
39 {
40 s.Append("\n");
41 }
42 s.Append("text: ").Append(groupId);
43 }
44 private void AddLabelAttribute()
45 {
46 if (!s.IsEmpty())
47 {
48 s.Append("\n");
49 }
50 s.Append("label: ").Append(label);
51 }
52 private void AddTargetAttribute()
53 {
54 if (!s.IsEmpty())
55 {
56 s.Append("\n");
57 }
58 s.Append("target: ").Append(target);
59 }
60 private void AddSymbolAttribute()
61 {
62 if (!s.IsEmpty())
63 {
64 s.Append("\n");
65 }
66 s.Append("symbol: ").Append(symbol);
67 }
68 public override void Visit(BoolNode& boolNode)
69 {
70 span = boolNode.GetSpan();
71 AddLineAttribute();
72 }
73 public override void Visit(SByteNode& sbyteNode)
74 {
75 span = sbyteNode.GetSpan();
76 AddLineAttribute();
77 }
78 public override void Visit(ByteNode& byteNode)
79 {
80 span = byteNode.GetSpan();
81 AddLineAttribute();
82 }
83 public override void Visit(ShortNode& shortNode)
84 {
85 span = shortNode.GetSpan();
86 AddLineAttribute();
87 }
88 public override void Visit(UShortNode& ushortNode)
89 {
90 span = ushortNode.GetSpan();
91 AddLineAttribute();
92 }
93 public override void Visit(IntNode& intNode)
94 {
95 span = intNode.GetSpan();
96 AddLineAttribute();
97 }
98 public override void Visit(UIntNode& uintNode)
99 {
100 span = uintNode.GetSpan();
101 AddLineAttribute();
102 }
103 public override void Visit(LongNode& longNode)
104 {
105 span = longNode.GetSpan();
106 AddLineAttribute();
107 }
108 public override void Visit(ULongNode& ulongNode)
109 {
110 span = ulongNode.GetSpan();
111 AddLineAttribute();
112 }
113 public override void Visit(FloatNode& floatNode)
114 {
115 span = floatNode.GetSpan();
116 AddLineAttribute();
117 }
118 public override void Visit(DoubleNode& doubleNode)
119 {
120 span = doubleNode.GetSpan();
121 AddLineAttribute();
122 }
123 public override void Visit(CharNode& charNode)
124 {
125 span = charNode.GetSpan();
126 AddLineAttribute();
127 }
128 public override void Visit(WCharNode& wcharNode)
129 {
130 span = wcharNode.GetSpan();
131 AddLineAttribute();
132 }
133 public override void Visit(UCharNode& ucharNode)
134 {
135 span = ucharNode.GetSpan();
136 AddLineAttribute();
137 }
138 public override void Visit(VoidNode& voidNode)
139 {
140 span = voidNode.GetSpan();
141 AddLineAttribute();
142 }
143 public override void Visit(BooleanLiteralNode& booleanLiteralNode)
144 {
145 span = booleanLiteralNode.GetSpan();
146 AddLineAttribute();
147 s.Append("\nvalue: ").Append(System.ToString(booleanLiteralNode.Value()));
148 }
149 public override void Visit(SByteLiteralNode& sbyteLiteralNode)
150 {
151 span = sbyteLiteralNode.GetSpan();
152 AddLineAttribute();
153 s.Append("\nvalue: ").Append(System.ToString(sbyteLiteralNode.Value()));
154 }
155 public override void Visit(ByteLiteralNode& byteLiteralNode)
156 {
157 span = byteLiteralNode.GetSpan();
158 AddLineAttribute();
159 s.Append("\nvalue: ").Append(System.ToString(byteLiteralNode.Value()));
160 }
161 public override void Visit(ShortLiteralNode& shortLiteralNode)
162 {
163 span = shortLiteralNode.GetSpan();
164 AddLineAttribute();
165 s.Append("\nvalue: ").Append(System.ToString(shortLiteralNode.Value()));
166 }
167 public override void Visit(UShortLiteralNode& ushortLiteralNode)
168 {
169 span = ushortLiteralNode.GetSpan();
170 AddLineAttribute();
171 s.Append("\nvalue: ").Append(System.ToString(ushortLiteralNode.Value()));
172 }
173 public override void Visit(IntLiteralNode& intLiteralNode)
174 {
175 span = intLiteralNode.GetSpan();
176 AddLineAttribute();
177 s.Append("\nvalue: ").Append(System.ToString(intLiteralNode.Value()));
178 }
179 public override void Visit(UIntLiteralNode& uintLiteralNode)
180 {
181 span = uintLiteralNode.GetSpan();
182 AddLineAttribute();
183 s.Append("\nvalue: ").Append(System.ToString(uintLiteralNode.Value()));
184 }
185 public override void Visit(LongLiteralNode& longLiteralNode)
186 {
187 span = longLiteralNode.GetSpan();
188 AddLineAttribute();
189 s.Append("\nvalue: ").Append(System.ToString(longLiteralNode.Value()));
190 }
191 public override void Visit(ULongLiteralNode& ulongLiteralNode)
192 {
193 span = ulongLiteralNode.GetSpan();
194 AddLineAttribute();
195 s.Append("\nvalue: ").Append(System.ToString(ulongLiteralNode.Value()));
196 }
197 public override void Visit(FloatLiteralNode& floatLiteralNode)
198 {
199 span = floatLiteralNode.GetSpan();
200 AddLineAttribute();
201 s.Append("\nvalue: ").Append(System.ToString(floatLiteralNode.Value()));
202 }
203 public override void Visit(DoubleLiteralNode& doubleLiteralNode)
204 {
205 span = doubleLiteralNode.GetSpan();
206 AddLineAttribute();
207 s.Append("\nvalue: ").Append(System.ToString(doubleLiteralNode.Value()));
208 }
209 public override void Visit(CharLiteralNode& charLiteralNode)
210 {
211 span = charLiteralNode.GetSpan();
212 AddLineAttribute();
213 s.Append("\nvalue: ").Append(System.ToString(charLiteralNode.Value()));
214 }
215 public override void Visit(WCharLiteralNode& wcharLiteralNode)
216 {
217 span = wcharLiteralNode.GetSpan();
218 AddLineAttribute();
219 s.Append("\nvalue: ").Append(System.ToString(wcharLiteralNode.Value()));
220 }
221 public override void Visit(UCharLiteralNode& ucharLiteralNode)
222 {
223 span = ucharLiteralNode.GetSpan();
224 AddLineAttribute();
225 s.Append("\nvalue: ").Append(System.ToString(ucharLiteralNode.Value()));
226 }
227 public override void Visit(StringLiteralNode& stringLiteralNode)
228 {
229 span = stringLiteralNode.GetSpan();
230 AddLineAttribute();
231 s.Append("\nvalue: ").Append(System.MakeStringLiteral(stringLiteralNode.Value()));
232 }
233 public override void Visit(WStringLiteralNode& wstringLiteralNode)
234 {
235 span = wstringLiteralNode.GetSpan();
236 AddLineAttribute();
237 s.Append("\nvalue: ").Append(System.MakeStringLiteral(ToUtf8(wstringLiteralNode.Value())));
238 }
239 public override void Visit(UStringLiteralNode& ustringLiteralNode)
240 {
241 span = ustringLiteralNode.GetSpan();
242 AddLineAttribute();
243 s.Append("\nvalue: ").Append(System.MakeStringLiteral(ToUtf8(ustringLiteralNode.Value())));
244 }
245 public override void Visit(NullLiteralNode& nullLiteralNode)
246 {
247 span = nullLiteralNode.GetSpan();
248 AddLineAttribute();
249 s.Append("\nvalue: ").Append("null");
250 }
251 public override void Visit(ArrayLiteralNode& arrayLiteralNode)
252 {
253 span = arrayLiteralNode.GetSpan();
254 AddLineAttribute();
255 }
256 public override void Visit(StructuredLiteralNode& structuredLiteralNode)
257 {
258 span = structuredLiteralNode.GetSpan();
259 AddLineAttribute();
260 }
261 public override void Visit(UuidLiteralNode& uuidLiteralNode)
262 {
263 span = uuidLiteralNode.GetSpan();
264 AddLineAttribute();
265 s.Append("\nvalue: ").Append(System.ToString(uuidLiteralNode.GetUuid()));
266 }
267 public override void Visit(CompileUnitNode& compileUnitNode)
268 {
269 span = compileUnitNode.GetSpan();
270 AddLineAttribute();
271 }
272 public override void Visit(NamespaceNode& namespaceNode)
273 {
274 span = namespaceNode.GetSpan();
275 AddLineAttribute();
276 }
277 public override void Visit(AliasNode& aliasNode)
278 {
279 span = aliasNode.GetSpan();
280 AddLineAttribute();
281 }
282 public override void Visit(NamespaceImportNode& namespaceImportNode)
283 {
284 span = namespaceImportNode.GetSpan();
285 AddLineAttribute();
286 }
287 public override void Visit(IdentifierNode& identifierNode)
288 {
289 span = identifierNode.GetSpan();
290 AddLineAttribute();
291 s.Append("\nid: ").Append(ToUtf8(identifierNode.Str()));
292 }
293 public override void Visit(TemplateIdNode& templateIdNode)
294 {
295 span = templateIdNode.GetSpan();
296 AddLineAttribute();
297 }
298 public override void Visit(FunctionNode& functionNode)
299 {
300 span = functionNode.GetSpan();
301 AddLineAttribute();
302 specifiers = functionNode.GetSpecifiers();
303 AddSpecifiersAttribute();
304 groupId = ToUtf8(functionNode.GroupId());
305 AddGroupIdAttribute();
306 }
307 public override void Visit(ClassNode& classNode)
308 {
309 span = classNode.GetSpan();
310 AddLineAttribute();
311 specifiers = classNode.GetSpecifiers();
312 AddSpecifiersAttribute();
313 }
314 public override void Visit(ThisInitializerNode& thisInitializerNode)
315 {
316 span = thisInitializerNode.GetSpan();
317 AddLineAttribute();
318 }
319 public override void Visit(BaseInitializerNode& baseInitializerNode)
320 {
321 span = baseInitializerNode.GetSpan();
322 AddLineAttribute();
323 }
324 public override void Visit(MemberInitializerNode& memberInitializerNode)
325 {
326 span = memberInitializerNode.GetSpan();
327 AddLineAttribute();
328 }
329 public override void Visit(StaticConstructorNode& staticConstructorNode)
330 {
331 span = staticConstructorNode.GetSpan();
332 AddLineAttribute();
333 specifiers = staticConstructorNode.GetSpecifiers();
334 AddSpecifiersAttribute();
335 }
336 public override void Visit(ConstructorNode& constructorNode)
337 {
338 span = constructorNode.GetSpan();
339 AddLineAttribute();
340 specifiers = constructorNode.GetSpecifiers();
341 AddSpecifiersAttribute();
342 }
343 public override void Visit(DestructorNode& destructorNode)
344 {
345 span = destructorNode.GetSpan();
346 AddLineAttribute();
347 specifiers = destructorNode.GetSpecifiers();
348 AddSpecifiersAttribute();
349 }
350 public override void Visit(MemberFunctionNode& memberFunctionNode)
351 {
352 span = memberFunctionNode.GetSpan();
353 AddLineAttribute();
354 specifiers = memberFunctionNode.GetSpecifiers();
355 AddSpecifiersAttribute();
356 }
357 public override void Visit(ConversionFunctionNode& conversionFunctionNode)
358 {
359 span = conversionFunctionNode.GetSpan();
360 AddLineAttribute();
361 specifiers = conversionFunctionNode.GetSpecifiers();
362 AddSpecifiersAttribute();
363 }
364 public override void Visit(MemberVariableNode& memberVariableNode)
365 {
366 span = memberVariableNode.GetSpan();
367 AddLineAttribute();
368 specifiers = memberVariableNode.GetSpecifiers();
369 AddSpecifiersAttribute();
370 }
371 public override void Visit(InterfaceNode& interfaceNode)
372 {
373 span = interfaceNode.GetSpan();
374 AddLineAttribute();
375 specifiers = interfaceNode.GetSpecifiers();
376 AddSpecifiersAttribute();
377 }
378 public override void Visit(DelegateNode& delegateNode)
379 {
380 span = delegateNode.GetSpan();
381 AddLineAttribute();
382 specifiers = delegateNode.GetSpecifiers();
383 AddSpecifiersAttribute();
384 }
385 public override void Visit(ClassDelegateNode& classDelegateNode)
386 {
387 span = classDelegateNode.GetSpan();
388 AddLineAttribute();
389 specifiers = classDelegateNode.GetSpecifiers();
390 AddSpecifiersAttribute();
391 }
392 public override void Visit(ParenthesizedConstraintNode& parenthesizedConstraintNode)
393 {
394 span = parenthesizedConstraintNode.GetSpan();
395 AddLineAttribute();
396 }
397 public override void Visit(DisjunctiveConstraintNode& disjunctiveConstraintNode)
398 {
399 span = disjunctiveConstraintNode.GetSpan();
400 AddLineAttribute();
401 }
402 public override void Visit(ConjunctiveConstraintNode& conjunctiveConstraintNode)
403 {
404 span = conjunctiveConstraintNode.GetSpan();
405 AddLineAttribute();
406 }
407 public override void Visit(WhereConstraintNode& whereConstraintNode)
408 {
409 span = whereConstraintNode.GetSpan();
410 AddLineAttribute();
411 }
412 public override void Visit(PredicateConstraintNode& predicateConstraintNode)
413 {
414 span = predicateConstraintNode.GetSpan();
415 AddLineAttribute();
416 }
417 public override void Visit(IsConstraintNode& isConstraintNode)
418 {
419 span = isConstraintNode.GetSpan();
420 AddLineAttribute();
421 }
422 public override void Visit(MultiParamConstraintNode& multiParamConstraintNode)
423 {
424 span = multiParamConstraintNode.GetSpan();
425 AddLineAttribute();
426 }
427 public override void Visit(TypeNameConstraintNode& typeNameConstraintNode)
428 {
429 span = typeNameConstraintNode.GetSpan();
430 AddLineAttribute();
431 }
432 public override void Visit(ConstructorConstraintNode& constructorConstraintNode)
433 {
434 span = constructorConstraintNode.GetSpan();
435 AddLineAttribute();
436 }
437 public override void Visit(DestructorConstraintNode& destructorConstraintNode)
438 {
439 span = destructorConstraintNode.GetSpan();
440 AddLineAttribute();
441 }
442 public override void Visit(MemberFunctionConstraintNode& memberFunctionConstraintNode)
443 {
444 span = memberFunctionConstraintNode.GetSpan();
445 AddLineAttribute();
446 groupId = ToUtf8(memberFunctionConstraintNode.GroupId());
447 AddGroupIdAttribute();
448 }
449 public override void Visit(FunctionConstraintNode& functionConstraintNode)
450 {
451 span = functionConstraintNode.GetSpan();
452 AddLineAttribute();
453 groupId = ToUtf8(functionConstraintNode.GroupId());
454 AddGroupIdAttribute();
455 }
456 public override void Visit(AxiomStatementNode& axiomStatementNode)
457 {
458 span = axiomStatementNode.GetSpan();
459 AddLineAttribute();
460 text = axiomStatementNode.ToString();
461 AddTextAttribute();
462 }
463 public override void Visit(AxiomNode& axiomNode)
464 {
465 span = axiomNode.GetSpan();
466 AddLineAttribute();
467 }
468 public override void Visit(ConceptIdNode& conceptIdNode)
469 {
470 span = conceptIdNode.GetSpan();
471 AddLineAttribute();
472 }
473 public override void Visit(ConceptNode& conceptNode)
474 {
475 span = conceptNode.GetSpan();
476 AddLineAttribute();
477 specifiers = conceptNode.GetSpecifiers();
478 AddSpecifiersAttribute();
479 }
480 public override void Visit(LabelNode& labelNode)
481 {
482 span = labelNode.GetSpan();
483 AddLineAttribute();
484 label = ToUtf8(labelNode.Label());
485 AddLabelAttribute();
486 }
487 public override void Visit(LabeledStatementNode& labeledStatementNode)
488 {
489 span = labeledStatementNode.GetSpan();
490 AddLineAttribute();
491 }
492 public override void Visit(CompoundStatementNode& compoundStatementNode)
493 {
494 span = compoundStatementNode.GetSpan();
495 AddLineAttribute();
496 }
497 public override void Visit(ReturnStatementNode& returnStatementNode)
498 {
499 span = returnStatementNode.GetSpan();
500 AddLineAttribute();
501 }
502 public override void Visit(IfStatementNode& ifStatementNode)
503 {
504 span = ifStatementNode.GetSpan();
505 AddLineAttribute();
506 }
507 public override void Visit(WhileStatementNode& whileStatementNode)
508 {
509 span = whileStatementNode.GetSpan();
510 AddLineAttribute();
511 }
512 public override void Visit(DoStatementNode& doStatementNode)
513 {
514 span = doStatementNode.GetSpan();
515 AddLineAttribute();
516 }
517 public override void Visit(ForStatementNode& forStatementNode)
518 {
519 span = forStatementNode.GetSpan();
520 AddLineAttribute();
521 }
522 public override void Visit(BreakStatementNode& breakStatementNode)
523 {
524 span = breakStatementNode.GetSpan();
525 AddLineAttribute();
526 }
527 public override void Visit(ContinueStatementNode& continueStatementNode)
528 {
529 span = continueStatementNode.GetSpan();
530 AddLineAttribute();
531 }
532 public override void Visit(GotoStatementNode& gotoStatementNode)
533 {
534 span = gotoStatementNode.GetSpan();
535 AddLineAttribute();
536 target = ToUtf8(gotoStatementNode.Target());
537 AddTargetAttribute();
538 }
539 public override void Visit(ConstructionStatementNode& constructionStatementNode)
540 {
541 span = constructionStatementNode.GetSpan();
542 AddLineAttribute();
543 }
544 public override void Visit(DeleteStatementNode& deleteStatementNode)
545 {
546 span = deleteStatementNode.GetSpan();
547 AddLineAttribute();
548 }
549 public override void Visit(DestroyStatementNode& destroyStatementNode)
550 {
551 span = destroyStatementNode.GetSpan();
552 AddLineAttribute();
553 }
554 public override void Visit(AssignmentStatementNode& assignmentStatementNode)
555 {
556 span = assignmentStatementNode.GetSpan();
557 AddLineAttribute();
558 }
559 public override void Visit(ExpressionStatementNode& expressionStatementNode)
560 {
561 span = expressionStatementNode.GetSpan();
562 AddLineAttribute();
563 }
564 public override void Visit(EmptyStatementNode& emptyStatementNode)
565 {
566 span = emptyStatementNode.GetSpan();
567 AddLineAttribute();
568 }
569 public override void Visit(RangeForStatementNode& rangeForStatementNode)
570 {
571 span = rangeForStatementNode.GetSpan();
572 AddLineAttribute();
573 }
574 public override void Visit(SwitchStatementNode& switchStatementNode)
575 {
576 span = switchStatementNode.GetSpan();
577 AddLineAttribute();
578 }
579 public override void Visit(CaseStatementNode& caseStatementNode)
580 {
581 span = caseStatementNode.GetSpan();
582 AddLineAttribute();
583 }
584 public override void Visit(DefaultStatementNode& defaultStatementNode)
585 {
586 span = defaultStatementNode.GetSpan();
587 AddLineAttribute();
588 }
589 public override void Visit(GotoCaseStatementNode& gotoCaseStatementNode)
590 {
591 span = gotoCaseStatementNode.GetSpan();
592 AddLineAttribute();
593 }
594 public override void Visit(GotoDefaultStatementNode& gotoDefaultStatementNode)
595 {
596 span = gotoDefaultStatementNode.GetSpan();
597 AddLineAttribute();
598 }
599 public override void Visit(ThrowStatementNode& throwStatementNode)
600 {
601 span = throwStatementNode.GetSpan();
602 AddLineAttribute();
603 }
604 public override void Visit(TryStatementNode& tryStatementNode)
605 {
606 span = tryStatementNode.GetSpan();
607 AddLineAttribute();
608 }
609 public override void Visit(CatchNode& catchNode)
610 {
611 span = catchNode.GetSpan();
612 AddLineAttribute();
613 }
614 public override void Visit(AssertStatementNode& assertStatementNode)
615 {
616 span = assertStatementNode.GetSpan();
617 AddLineAttribute();
618 }
619 public override void Visit(ConditionalCompilationPartNode& conditionalCompilationPartNode)
620 {
621 span = conditionalCompilationPartNode.GetSpan();
622 AddLineAttribute();
623 }
624 public override void Visit(ConditionalCompilationDisjunctionNode& conditionalCompilationDisjunctionNode)
625 {
626 span = conditionalCompilationDisjunctionNode.GetSpan();
627 AddLineAttribute();
628 }
629 public override void Visit(ConditionalCompilationConjunctionNode& conditionalCompilationConjunctionNode)
630 {
631 span = conditionalCompilationConjunctionNode.GetSpan();
632 AddLineAttribute();
633 }
634 public override void Visit(ConditionalCompilationNotNode& conditionalCompilationNotNode)
635 {
636 span = conditionalCompilationNotNode.GetSpan();
637 AddLineAttribute();
638 }
639 public override void Visit(ConditionalCompilationPrimaryNode& conditionalCompilationPrimaryNode)
640 {
641 span = conditionalCompilationPrimaryNode.GetSpan();
642 AddLineAttribute();
643 symbol = ToUtf8(conditionalCompilationPrimaryNode.Symbol());
644 AddSymbolAttribute();
645 }
646 public override void Visit(ParenthesizedConditionalCompilationExpressionNode& parenthesizeCondCompExprNode)
647 {
648 span = parenthesizeCondCompExprNode.GetSpan();
649 AddLineAttribute();
650 }
651 public override void Visit(ConditionalCompilationStatementNode& conditionalCompilationStatementNode)
652 {
653 span = conditionalCompilationStatementNode.GetSpan();
654 AddLineAttribute();
655 }
656 public override void Visit(TypedefNode& typedefNode)
657 {
658 span = typedefNode.GetSpan();
659 AddLineAttribute();
660 specifiers = typedefNode.GetSpecifiers();
661 AddSpecifiersAttribute();
662 }
663 public override void Visit(ConstantNode& constantNode)
664 {
665 span = constantNode.GetSpan();
666 AddLineAttribute();
667 specifiers = constantNode.GetSpecifiers();
668 AddSpecifiersAttribute();
669 }
670 public override void Visit(EnumTypeNode& enumTypeNode)
671 {
672 span = enumTypeNode.GetSpan();
673 AddLineAttribute();
674 specifiers = enumTypeNode.GetSpecifiers();
675 AddSpecifiersAttribute();
676 }
677 public override void Visit(EnumConstantNode& enumConstantNode)
678 {
679 span = enumConstantNode.GetSpan();
680 AddLineAttribute();
681 }
682 public override void Visit(ParameterNode& parameterNode)
683 {
684 span = parameterNode.GetSpan();
685 AddLineAttribute();
686 }
687 public override void Visit(TemplateParameterNode& templateParameterNode)
688 {
689 span = templateParameterNode.GetSpan();
690 AddLineAttribute();
691 }
692 public override void Visit(ConstNode& constNode)
693 {
694 span = constNode.GetSpan();
695 AddLineAttribute();
696 }
697 public override void Visit(LValueRefNode& lvalueRefNode)
698 {
699 span = lvalueRefNode.GetSpan();
700 AddLineAttribute();
701 }
702 public override void Visit(RValueRefNode& rvalueRefNode)
703 {
704 span = rvalueRefNode.GetSpan();
705 AddLineAttribute();
706 }
707 public override void Visit(PointerNode& pointerNode)
708 {
709 span = pointerNode.GetSpan();
710 AddLineAttribute();
711 }
712 public override void Visit(ArrayNode& arrayNode)
713 {
714 span = arrayNode.GetSpan();
715 AddLineAttribute();
716 }
717 public override void Visit(DotNode& dotNode)
718 {
719 span = dotNode.GetSpan();
720 AddLineAttribute();
721 }
722 public override void Visit(ArrowNode& arrowNode)
723 {
724 span = arrowNode.GetSpan();
725 AddLineAttribute();
726 }
727 public override void Visit(EquivalenceNode& equivalenceNode)
728 {
729 span = equivalenceNode.GetSpan();
730 AddLineAttribute();
731 }
732 public override void Visit(ImplicationNode& implicationNode)
733 {
734 span = implicationNode.GetSpan();
735 AddLineAttribute();
736 }
737 public override void Visit(DisjunctionNode& disjunctionNode)
738 {
739 span = disjunctionNode.GetSpan();
740 AddLineAttribute();
741 }
742 public override void Visit(ConjunctionNode& conjunctionNode)
743 {
744 span = conjunctionNode.GetSpan();
745 AddLineAttribute();
746 }
747 public override void Visit(BitOrNode& bitOrNode)
748 {
749 span = bitOrNode.GetSpan();
750 AddLineAttribute();
751 }
752 public override void Visit(BitXorNode& bitXorNode)
753 {
754 span = bitXorNode.GetSpan();
755 AddLineAttribute();
756 }
757 public override void Visit(BitAndNode& bitAndNode)
758 {
759 span = bitAndNode.GetSpan();
760 AddLineAttribute();
761 }
762 public override void Visit(EqualNode& equalNode)
763 {
764 span = equalNode.GetSpan();
765 AddLineAttribute();
766 }
767 public override void Visit(NotEqualNode& notEqualNode)
768 {
769 span = notEqualNode.GetSpan();
770 AddLineAttribute();
771 }
772 public override void Visit(LessNode& lessNode)
773 {
774 span = lessNode.GetSpan();
775 AddLineAttribute();
776 }
777 public override void Visit(GreaterNode& greaterNode)
778 {
779 span = greaterNode.GetSpan();
780 AddLineAttribute();
781 }
782 public override void Visit(LessOrEqualNode& lessOrEqualNode)
783 {
784 span = lessOrEqualNode.GetSpan();
785 AddLineAttribute();
786 }
787 public override void Visit(GreaterOrEqualNode& greaterOrEqualNode)
788 {
789 span = greaterOrEqualNode.GetSpan();
790 AddLineAttribute();
791 }
792 public override void Visit(ShiftLeftNode& shiftLeftNode)
793 {
794 span = shiftLeftNode.GetSpan();
795 AddLineAttribute();
796 }
797 public override void Visit(ShiftRightNode& shiftRightNode)
798 {
799 span = shiftRightNode.GetSpan();
800 AddLineAttribute();
801 }
802 public override void Visit(AddNode& addNode)
803 {
804 span = addNode.GetSpan();
805 AddLineAttribute();
806 }
807 public override void Visit(SubNode& subNode)
808 {
809 span = subNode.GetSpan();
810 AddLineAttribute();
811 }
812 public override void Visit(MulNode& mulNode)
813 {
814 span = mulNode.GetSpan();
815 AddLineAttribute();
816 }
817 public override void Visit(DivNode& divNode)
818 {
819 span = divNode.GetSpan();
820 AddLineAttribute();
821 }
822 public override void Visit(RemNode& remNode)
823 {
824 span = remNode.GetSpan();
825 AddLineAttribute();
826 }
827 public override void Visit(NotNode& notNode)
828 {
829 span = notNode.GetSpan();
830 AddLineAttribute();
831 }
832 public override void Visit(UnaryPlusNode& unaryPlusNode)
833 {
834 span = unaryPlusNode.GetSpan();
835 AddLineAttribute();
836 }
837 public override void Visit(UnaryMinusNode& unaryMinusNode)
838 {
839 span = unaryMinusNode.GetSpan();
840 AddLineAttribute();
841 }
842 public override void Visit(PrefixIncrementNode& prefixIncrementNode)
843 {
844 span = prefixIncrementNode.GetSpan();
845 AddLineAttribute();
846 }
847 public override void Visit(PrefixDecrementNode& prefixDecrementNode)
848 {
849 span = prefixDecrementNode.GetSpan();
850 AddLineAttribute();
851 }
852 public override void Visit(DerefNode& derefNode)
853 {
854 span = derefNode.GetSpan();
855 AddLineAttribute();
856 }
857 public override void Visit(AddrOfNode& addrOfNode)
858 {
859 span = addrOfNode.GetSpan();
860 AddLineAttribute();
861 }
862 public override void Visit(ComplementNode& complementNode)
863 {
864 span = complementNode.GetSpan();
865 AddLineAttribute();
866 }
867 public override void Visit(IsNode& isNode)
868 {
869 span = isNode.GetSpan();
870 AddLineAttribute();
871 }
872 public override void Visit(AsNode& asNode)
873 {
874 span = asNode.GetSpan();
875 AddLineAttribute();
876 }
877 public override void Visit(IndexingNode& indexingNode)
878 {
879 span = indexingNode.GetSpan();
880 AddLineAttribute();
881 }
882 public override void Visit(InvokeNode& invokeNode)
883 {
884 span = invokeNode.GetSpan();
885 AddLineAttribute();
886 }
887 public override void Visit(PostfixIncrementNode& postfixIncrementNode)
888 {
889 span = postfixIncrementNode.GetSpan();
890 AddLineAttribute();
891 }
892 public override void Visit(PostfixDecrementNode& postfixDecrementNode)
893 {
894 span = postfixDecrementNode.GetSpan();
895 AddLineAttribute();
896 }
897 public override void Visit(SizeOfNode& sizeOfNode)
898 {
899 span = sizeOfNode.GetSpan();
900 AddLineAttribute();
901 }
902 public override void Visit(TypeNameNode& typeNameNode)
903 {
904 span = typeNameNode.GetSpan();
905 AddLineAttribute();
906 }
907 public override void Visit(TypeIdNode& typeIdNode)
908 {
909 span = typeIdNode.GetSpan();
910 AddLineAttribute();
911 }
912 public override void Visit(CastNode& castNode)
913 {
914 span = castNode.GetSpan();
915 AddLineAttribute();
916 }
917 public override void Visit(ConstructNode& constructNode)
918 {
919 span = constructNode.GetSpan();
920 AddLineAttribute();
921 }
922 public override void Visit(NewNode& newNode)
923 {
924 span = newNode.GetSpan();
925 AddLineAttribute();
926 }
927 public override void Visit(ThisNode& thisNode)
928 {
929 span = thisNode.GetSpan();
930 AddLineAttribute();
931 }
932 public override void Visit(BaseNode& baseNode)
933 {
934 span = baseNode.GetSpan();
935 AddLineAttribute();
936 }
937 public override void Visit(ParenthesizedExpressionNode& parenthesizedExpressionNode)
938 {
939 span = parenthesizedExpressionNode.GetSpan();
940 AddLineAttribute();
941 }
942 public override void Visit(GlobalVariableNode& globalVariableNode)
943 {
944 span = globalVariableNode.GetSpan();
945 AddLineAttribute();
946 specifiers = globalVariableNode.GetSpecifiers();
947 AddSpecifiersAttribute();
948 }
949 public override void Visit(AttributeNode& attribute)
950 {
951 span = attribute.GetSpan();
952 AddLineAttribute();
953 }
954 public override void Visit(AttributesNode& attributes)
955 {
956 span = attributes.GetSpan();
957 AddLineAttribute();
958 }
959 public override void Visit(CommentNode& commentNode)
960 {
961 span = commentNode.GetSpan();
962 AddLineAttribute();
963 }
964 public string s;
965 public Span span;
966 public Specifiers specifiers;
967 public string groupId;
968 public string text;
969 public string label;
970 public string target;
971 public string symbol;
972 }