The StaDyn Programming Language
Source code documentation of StaDyn, a hybrid static and dynamic typing language.
VisitorDebug.cs
Go to the documentation of this file.
1 // -------------------------------------------------------------------------- //
3 // Project rROTOR //
4 // -------------------------------------------------------------------------- //
5 // File: VisitorDebug.cs //
6 // Author: Cristina Gonzalez Muņoz - cristi.gm@gmail.com //
7 // Description: //
8 // This class shows the information of the abstract syntax tree. //
9 // Inheritance: VisitorAdapter //
10 // Implements Visitor pattern [Concrete Visitor]. //
11 // -------------------------------------------------------------------------- //
12 // Create date: 11-12-2006 //
13 // Modification date: 10-05-2007 //
15 
16 using System;
17 using System.Collections.Generic;
18 using System.IO;
19 using System.Text;
20 
21 using AST;
22 using TypeSystem;
23 using Tools;
24 
25 namespace Debugger
26 {
35  {
36  #region Fields
37 
41  private TextWriter output;
42 
43  #endregion
44 
45  #region Constructor
46 
51  public VisitorDebug(TextWriter writer)
52  {
53  this.output = writer;
54  }
55 
56  #endregion
57 
58  #region printIndentation
59 
64  private void printIndentation(int lenght)
65  {
66  for (int i = 0; i < lenght * 2; i++)
67  {
68  this.output.Write(" ");
69  }
70  this.output.Write("|_ ");
71  }
72 
73  #endregion
74 
75  #region Visit(SourceFile node, Object obj)
76 
77  public override Object Visit(SourceFile node, Object obj)
78  {
79  int indent = Convert.ToInt32(obj);
80  this.printIndentation(indent);
81  this.output.WriteLine("Source code [{0}:{1}]", node.Location.Line, node.Location.Column);
82  this.printIndentation(indent + 1);
83  this.output.WriteLine("Usings");
84  for (int i = 0; i < node.Usings.Count; i++)
85  {
86  this.printIndentation(indent + 2);
87  this.output.WriteLine(node.Usings[i]);
88  }
89 
90  foreach (string key in node.Namespacekeys)
91  {
92  int count = node.GetNamespaceDefinitionCount(key);
93  for (int i = 0; i < count; i++)
94  {
95  node.GetNamespaceDeclarationElement(key, i).Accept(this, indent + 1);
96  }
97  }
98 
99  for (int i = 0; i < node.DeclarationCount; i++)
100  {
101  this.printIndentation(indent + 1);
102  this.output.WriteLine("Definition");
103  node.GetDeclarationElement(i).Accept(this, indent + 2);
104  }
105  return null;
106  }
107 
108  #endregion
109 
110  #region Visit(Namespace node, Object obj)
111 
112  public override Object Visit(Namespace node, Object obj)
113  {
114  int indent = Convert.ToInt32(obj);
115 
116  this.printIndentation(indent);
117  this.output.WriteLine("Namespace: {0} [{1}:{2}]", node.Identifier.Identifier, node.Location.Line, node.Location.Column);
118 
119  for (int i = 0; i < node.NamespaceMembersCount; i++)
120  {
121  this.printIndentation(indent + 1);
122  this.output.WriteLine("Definition");
123  node.GetDeclarationElement(i).Accept(this, indent + 2);
124  }
125 
126  return null;
127 
128  }
129 
130  #endregion
131 
132  #region printType()
133 
134  private string printType(TypeExpression type)
135  {
136  if (type != null)
137  return type.ToString();
138  else
139  return "ERROR!! NO ASIGNADO";
140  //return "";
141  }
142 
143  #endregion
144 
145  #region Visit(IdDeclaration node, Object obj
146 
147  public override Object Visit(IdDeclaration node, Object obj)
148  {
149  int indent = Convert.ToInt32(obj);
150  this.printIndentation(indent);
151  if (node.IdentifierExp.IndexOfSSA != -1)
152  this.output.WriteLine("Declaration: {0}{1} [{2}:{3}]", node.Identifier, node.IdentifierExp.IndexOfSSA, node.Location.Line, node.Location.Column);
153  else
154  this.output.WriteLine("Declaration: {0} [{1}:{2}]", node.Identifier, node.Location.Line, node.Location.Column);
155  this.printIndentation(indent + 1);
156  this.output.Write("Type: ");
157  this.output.WriteLine(printType(node.TypeExpr));
158  return null;
159  }
160 
161  #endregion
162 
163  #region Visit(PropertyDefinition node, Object obj)
164 
165  public override Object Visit(PropertyDefinition node, Object obj)
166  {
167  int indent = Convert.ToInt32(obj);
168  this.printIndentation(indent);
169  this.output.WriteLine("Property: {0} [{1}:{2}]", node.Identifier, node.Location.Line, node.Location.Column);
170 
171  this.printIndentation(indent + 1);
172  this.output.Write("Type: ");
173  this.output.WriteLine(printType(node.TypeExpr));
174 
175  if (node.GetBlock != null)
176  {
177  this.printIndentation(indent + 1);
178  this.output.WriteLine("GetAccesor");
179  node.GetBlock.Accept(this, indent + 2);
180  }
181  if (node.SetBlock != null)
182  {
183  this.printIndentation(indent + 1);
184  this.output.WriteLine("SetAccesor");
185  node.SetBlock.Accept(this, indent + 2);
186  }
187  return null;
188  }
189 
190  #endregion
191 
192  #region Visit(Definition node, Object obj)
193 
194  public override Object Visit(Definition node, Object obj)
195  {
196  int indent = Convert.ToInt32(obj);
197  this.printIndentation(indent);
198  if (node.IdentifierExp.IndexOfSSA != -1)
199  this.output.WriteLine("Definition: {0}{1} [{2}:{3}]", node.Identifier, node.IdentifierExp.IndexOfSSA, node.Location.Line, node.Location.Column);
200  else
201  this.output.WriteLine("Definition: {0} [{1}:{2}]", node.Identifier, node.Location.Line, node.Location.Column);
202  this.printIndentation(indent + 1);
203  this.output.Write("Type: ");
204  this.output.WriteLine(printType(node.TypeExpr));
205  return node.Init.Accept(this, indent + 1);
206  }
207 
208  #endregion
209 
210  #region Visit(ConstantDefinition node, Object obj)
211 
212  public override Object Visit(ConstantDefinition node, Object obj)
213  {
214  int indent = Convert.ToInt32(obj);
215  this.printIndentation(indent);
216  if (node.IdentifierExp.IndexOfSSA != -1)
217  this.output.WriteLine("Constant Definition: {0}{1} [{2}:{3}]", node.Identifier, node.IdentifierExp.IndexOfSSA, node.Location.Line, node.Location.Column);
218  else
219  this.output.WriteLine("Constant Definition: {0} [{1}:{2}]", node.Identifier, node.Location.Line, node.Location.Column);
220  this.printIndentation(indent + 1);
221  this.output.Write("Type: ");
222  this.output.WriteLine(printType(node.TypeExpr));
223 
224  return node.Init.Accept(this, indent + 1);
225  }
226 
227  #endregion
228 
229  #region Visit(ClassDefinition node, Object obj)
230 
231  public override Object Visit(ClassDefinition node, Object obj)
232  {
233  int indent = Convert.ToInt32(obj);
234  this.printIndentation(indent);
235  this.output.WriteLine("Class: {0} [{1}:{2}]", node.Identifier, node.Location.Line, node.Location.Column);
236 
237  this.printIndentation(indent + 1);
238  this.output.Write("Type: ");
239  this.output.WriteLine(printType(node.TypeExpr));
240 
241  for (int i = 0; i < node.MemberCount; i++)
242  {
243  node.GetMemberElement(i).Accept(this, indent + 1);
244  }
245  return null;
246  }
247 
248  #endregion
249 
250  #region Visit(InterfaceDefinition node, Object obj)
251 
252  public override Object Visit(InterfaceDefinition node, Object obj)
253  {
254  int indent = Convert.ToInt32(obj);
255  this.printIndentation(indent);
256  this.output.WriteLine("Interface: {0} [{1}:{2}]", node.Identifier, node.Location.Line, node.Location.Column);
257 
258  this.printIndentation(indent + 1);
259  this.output.Write("Type: ");
260  this.output.WriteLine(printType(node.TypeExpr));
261 
262  for (int i = 0; i < node.MemberCount; i++)
263  {
264  node.GetMemberElement(i).Accept(this, indent + 1);
265  }
266  return null;
267  }
268 
269  #endregion
270 
271  #region Visit(FieldDeclaration node, Object obj)
272 
273  public override Object Visit(FieldDeclaration node, Object obj)
274  {
275  int indent = Convert.ToInt32(obj);
276  this.printIndentation(indent);
277  this.output.WriteLine("Field: {0} [{1}:{2}]", node.Identifier, node.Location.Line, node.Location.Column);
278 
279  this.printIndentation(indent + 1);
280  this.output.Write("Type: ");
281  this.output.WriteLine(printType(node.TypeExpr));
282 
283  return null;
284  }
285 
286  #endregion
287 
288  #region Visit(FieldDefinition node, Object obj)
289 
290  public override Object Visit(FieldDefinition node, Object obj)
291  {
292  int indent = Convert.ToInt32(obj);
293  this.printIndentation(indent);
294  this.output.WriteLine("Field: {0} [{1}:{2}]", node.Identifier, node.Location.Line, node.Location.Column);
295 
296  this.printIndentation(indent + 1);
297  this.output.Write("Type: ");
298  this.output.WriteLine(printType(node.TypeExpr));
299 
300  return node.Init.Accept(this, indent + 1);
301  }
302 
303  #endregion
304 
305  #region Visit(ConstantFieldDefinition node, Object obj)
306 
307  public override Object Visit(ConstantFieldDefinition node, Object obj)
308  {
309  int indent = Convert.ToInt32(obj);
310  this.printIndentation(indent);
311  this.output.WriteLine("Constant Field: {0} [{1}:{2}]", node.Identifier, node.Location.Line, node.Location.Column);
312  this.printIndentation(indent + 1);
313  this.output.Write("Type: ");
314  this.output.WriteLine(printType(node.TypeExpr));
315 
316  return node.Init.Accept(this, indent + 1);
317  }
318 
319  #endregion
320 
321  #region Visit(MethodDeclaration node, Object obj)
322 
323  public override Object Visit(MethodDeclaration node, Object obj)
324  {
325  int indent = Convert.ToInt32(obj);
326  this.printIndentation(indent);
327  this.output.WriteLine("Method: {0} [{1}:{2}]", node.Identifier, node.Location.Line, node.Location.Column);
328 
329  this.printIndentation(indent + 1);
330  this.output.Write("Type: ");
331  this.output.WriteLine(printType(node.TypeExpr));
332 
333  return null;
334  }
335 
336  #endregion
337 
338  #region Visit(MethodDefinition node, Object obj)
339 
340  public override Object Visit(MethodDefinition node, Object obj)
341  {
342  int indent = Convert.ToInt32(obj);
343  this.printIndentation(indent);
344  this.output.WriteLine("Method: {0} [{1}:{2}]", node.Identifier, node.Location.Line, node.Location.Column);
345 
346  this.printIndentation(indent + 1);
347  this.output.Write("Type: ");
348  this.output.WriteLine(printType(node.TypeExpr));
349 
350  return node.Body.Accept(this, indent + 1);
351  }
352 
353  #endregion
354 
355  #region Visit(ConstructorDefinition node, Object obj)
356 
357  public override Object Visit(ConstructorDefinition node, Object obj)
358  {
359  int indent = Convert.ToInt32(obj);
360  this.printIndentation(indent);
361  this.output.WriteLine("Constructor: {0} [{1}:{2}]", node.Identifier, node.Location.Line, node.Location.Column);
362 
363  this.printIndentation(indent + 1);
364  this.output.Write("Type: ");
365  this.output.WriteLine(printType(node.TypeExpr));
366 
367  if (node.Initialization != null)
368  node.Initialization.Accept(this, indent + 1);
369  return node.Body.Accept(this, indent + 1);
370  }
371 
372  #endregion
373 
374  // Expressions
375 
376  #region Visit(ArgumentExpression node, Object obj)
377 
378  public override Object Visit(ArgumentExpression node, Object obj)
379  {
380  int indent = Convert.ToInt32(obj);
381  this.printIndentation(indent);
382  this.output.WriteLine("Argument [{0}:{1}]", node.Location.Line, node.Location.Column);
383  return node.Argument.Accept(this, indent + 1);
384  }
385 
386  #endregion
387 
388  #region Visit(ArithmeticExpression node, Object obj)
389 
390  public override Object Visit(ArithmeticExpression node, Object obj)
391  {
392  int indent = Convert.ToInt32(obj);
393  this.printIndentation(indent);
394  this.output.Write("ArithmeticExpression ");
395  switch (node.Operator)
396  {
397  case ArithmeticOperator.Minus: this.output.Write("-"); break;
398  case ArithmeticOperator.Plus: this.output.Write("+"); break;
399  case ArithmeticOperator.Mult: this.output.Write("*"); break;
400  case ArithmeticOperator.Div: this.output.Write("/"); break;
401  case ArithmeticOperator.Mod: this.output.Write("%"); break;
402  }
403  this.output.WriteLine(" Type: {0} [{1}:{2}]", printType(node.ExpressionType), node.Location.Line, node.Location.Column);
404  node.FirstOperand.Accept(this, indent + 1);
405  node.SecondOperand.Accept(this, indent + 1);
406  return null;
407  }
408 
409  #endregion
410 
411  #region Visit(ArrayAccessExpression node, Object obj)
412 
413  public override Object Visit(ArrayAccessExpression node, Object obj)
414  {
415  int indent = Convert.ToInt32(obj);
416  this.printIndentation(indent);
417  this.output.WriteLine("ArrayAccessExpression Type: {0} [{1}:{2}]", printType(node.ExpressionType), node.Location.Line, node.Location.Column);
418  node.FirstOperand.Accept(this, indent + 1);
419  node.SecondOperand.Accept(this, indent + 1);
420  return null;
421  }
422 
423  #endregion
424 
425  #region Visit(AssignmentExpression node, Object obj)
426 
427  public override Object Visit(AssignmentExpression node, Object obj)
428  {
429  int indent = Convert.ToInt32(obj);
430  this.printIndentation(indent);
431  this.output.Write("AssignmentExpression ");
432  switch (node.Operator)
433  {
434  case AssignmentOperator.Assign: this.output.Write("="); break;
435  case AssignmentOperator.PlusAssign: this.output.Write("+="); break;
436  case AssignmentOperator.MinusAssign: this.output.Write("-="); break;
437  case AssignmentOperator.MultAssign: this.output.Write("*="); break;
438  case AssignmentOperator.DivAssign: this.output.Write("/="); break;
439  case AssignmentOperator.ModAssign: this.output.Write("%="); break;
440  case AssignmentOperator.ShiftRightAssign: this.output.Write(">>="); break;
441  case AssignmentOperator.ShiftLeftAssign: this.output.Write("<<="); break;
442  case AssignmentOperator.BitwiseAndAssign: this.output.Write("&="); break;
443  case AssignmentOperator.BitwiseXOrAssign: this.output.Write("^="); break;
444  case AssignmentOperator.BitwiseOrAssign: this.output.Write("|="); break;
445  }
446  this.output.WriteLine(" Type: {0} [{1}:{2}]", printType(node.ExpressionType), node.Location.Line, node.Location.Column); node.FirstOperand.Accept(this, indent + 1);
447  node.SecondOperand.Accept(this, indent + 1);
448  if (node.MoveStat != null)
449  node.MoveStat.Accept(this, indent + 1);
450  return null;
451  }
452 
453  #endregion
454 
455  #region Visit(BaseCallExpression node, Object obj)
456 
457  public override Object Visit(BaseCallExpression node, Object obj)
458  {
459  int indent = Convert.ToInt32(obj);
460  this.printIndentation(indent);
461  this.output.WriteLine("BaseCallExpression Type: {0} [{1}:{2}]", printType(node.ExpressionType), node.Location.Line, node.Location.Column);
462  return node.Arguments.Accept(this, indent + 1);
463  }
464 
465  #endregion
466 
467  #region Visit(BitwiseExpression node, Object obj)
468 
469  public override Object Visit(BitwiseExpression node, Object obj)
470  {
471  int indent = Convert.ToInt32(obj);
472  this.printIndentation(indent);
473  this.output.Write("BitwiseExpression ");
474  switch (node.Operator)
475  {
476  case BitwiseOperator.BitwiseOr: this.output.Write("|"); break;
477  case BitwiseOperator.BitwiseAnd: this.output.Write("&"); break;
478  case BitwiseOperator.BitwiseXOr: this.output.Write("^"); break;
479  case BitwiseOperator.ShiftLeft: this.output.Write("<<"); break;
480  case BitwiseOperator.ShiftRight: this.output.Write(">>"); break;
481  }
482  this.output.WriteLine(" Type: {0} [{1}:{2}]", printType(node.ExpressionType), node.Location.Line, node.Location.Column);
483  node.FirstOperand.Accept(this, indent + 1);
484  node.SecondOperand.Accept(this, indent + 1);
485  return null;
486  }
487 
488  #endregion
489 
490  #region Visit(CastExpression node, Object obj)
491 
492  public override Object Visit(CastExpression node, Object obj)
493  {
494  int indent = Convert.ToInt32(obj);
495  this.printIndentation(indent);
496  this.output.WriteLine("CastExpression Type: {0} [{1}:{2}]", printType(node.ExpressionType), node.Location.Line, node.Location.Column);
497  return node.Expression.Accept(this, indent + 1);
498  }
499 
500  #endregion
501 
502  #region Visit(FieldAccessExpression node, Object obj)
503 
504  public override Object Visit(FieldAccessExpression node, Object obj)
505  {
506  int indent = Convert.ToInt32(obj);
507  this.printIndentation(indent);
508  this.output.WriteLine("FieldAccessExpression Type: {0} [{1}:{2}]", printType(node.ExpressionType), node.Location.Line, node.Location.Column);
509  node.Expression.Accept(this, indent + 1);
510  node.FieldName.Accept(this, indent + 1);
511  return null;
512  }
513 
514  #endregion
515 
516  #region Visit(InvocationExpression node, Object obj)
517 
518  public override Object Visit(InvocationExpression node, Object obj)
519  {
520  int indent = Convert.ToInt32(obj);
521  this.printIndentation(indent);
522  this.output.WriteLine("InvocationExpression Type: {0} [{1}:{2}]", printType(node.ExpressionType), node.Location.Line, node.Location.Column);
523  node.Identifier.Accept(this, indent + 1);
524  node.Arguments.Accept(this, indent + 1);
525  return null;
526  }
527 
528  #endregion
529 
530  #region Visit(IsExpression node, Object obj)
531 
532  public override Object Visit(IsExpression node, Object obj)
533  {
534  int indent = Convert.ToInt32(obj);
535  this.printIndentation(indent);
536  this.output.WriteLine("IsExpression Type: {0} [{1}:{2}]", printType(node.ExpressionType), node.Location.Line, node.Location.Column);
537  node.Expression.Accept(this, indent + 1);
538  this.printIndentation(indent + 1);
539  this.output.WriteLine(printType(node.TypeExpr));
540  return null;
541  }
542 
543  #endregion
544 
545  #region Visit(LogicalExpression node, Object obj)
546 
547  public override Object Visit(LogicalExpression node, Object obj)
548  {
549  int indent = Convert.ToInt32(obj);
550  this.printIndentation(indent);
551  this.output.Write("LogicalExpression ");
552  switch (node.Operator)
553  {
554  case LogicalOperator.Or: this.output.Write("||"); break;
555  case LogicalOperator.And: this.output.Write("&&"); break;
556  }
557  this.output.WriteLine(" Type: {0} [{1}:{2}]", printType(node.ExpressionType), node.Location.Line, node.Location.Column);
558  node.FirstOperand.Accept(this, indent + 1);
559  node.SecondOperand.Accept(this, indent + 1);
560  return null;
561  }
562 
563  #endregion
564 
565  #region Visit(NewArrayExpression node, Object obj)
566 
567  public override Object Visit(NewArrayExpression node, Object obj)
568  {
569  int indent = Convert.ToInt32(obj);
570  this.printIndentation(indent);
571  this.output.WriteLine("NewArrayExpression: {0} rank: {1} Type: {2} [{3}:{4}]", node.TypeInfo, node.Rank, printType(node.ExpressionType), node.Location.Line, node.Location.Column);
572  if (node.Size != null)
573  {
574  this.printIndentation(indent + 1);
575  this.output.WriteLine("Size:");
576  node.Size.Accept(this, indent + 2);
577  }
578  if (node.Init != null)
579  node.Init.Accept(this, indent + 1);
580  return null;
581  }
582 
583  #endregion
584 
585  #region Visit(NewExpression node, Object obj)
586 
587  public override Object Visit(NewExpression node, Object obj)
588  {
589  int indent = Convert.ToInt32(obj);
590  this.printIndentation(indent);
591  this.output.WriteLine("NewExpression: {0} Type: {1} [{2}:{3}]", node.TypeInfo, printType(node.ExpressionType), node.Location.Line, node.Location.Column);
592  return node.Arguments.Accept(this, indent + 1);
593  }
594 
595  #endregion
596 
597  #region Visit(QualifiedIdentifierExpression node, Object obj)
598 
599  public override Object Visit(QualifiedIdentifierExpression node, Object obj)
600  {
601  int indent = Convert.ToInt32(obj);
602  this.printIndentation(indent);
603  this.output.WriteLine("QualifiedIdentifierExpression Type: {0} [{1}:{2}]", printType(node.ExpressionType), node.Location.Line, node.Location.Column);
604  node.IdName.Accept(this, indent + 1);
605  node.IdExpression.Accept(this, indent + 1);
606  return null;
607  }
608 
609  #endregion
610 
611  #region Visit(RelationalExpression node, Object obj)
612 
613  public override Object Visit(RelationalExpression node, Object obj)
614  {
615  int indent = Convert.ToInt32(obj);
616  this.printIndentation(indent);
617  this.output.Write("RelationalExpression ");
618  switch (node.Operator)
619  {
620  case RelationalOperator.NotEqual: this.output.Write("!="); break;
621  case RelationalOperator.Equal: this.output.Write("=="); break;
622  case RelationalOperator.LessThan: this.output.Write("<"); break;
623  case RelationalOperator.GreaterThan: this.output.Write(">"); break;
624  case RelationalOperator.LessThanOrEqual: this.output.Write("<="); break;
625  case RelationalOperator.GreaterThanOrEqual: this.output.Write(">="); break;
626  }
627  this.output.WriteLine(" Type: {0} [{1}:{2}]", printType(node.ExpressionType), node.Location.Line, node.Location.Column);
628  node.FirstOperand.Accept(this, indent + 1);
629  node.SecondOperand.Accept(this, indent + 1);
630  return null;
631  }
632 
633  #endregion
634 
635  #region Visit(TernaryExpression node, Object obj)
636 
637  public override Object Visit(TernaryExpression node, Object obj)
638  {
639  int indent = Convert.ToInt32(obj);
640  this.printIndentation(indent);
641  this.output.WriteLine("TernaryExpression ? Type: {0} [{1}:{2}]", printType(node.ExpressionType), node.Location.Line, node.Location.Column);
642  node.FirstOperand.Accept(this, indent + 1);
643  node.SecondOperand.Accept(this, indent + 1);
644  node.ThirdOperand.Accept(this, indent + 1);
645  return null;
646  }
647 
648  #endregion
649 
650  #region Visit(UnaryExpression node, Object obj)
651 
652  public override Object Visit(UnaryExpression node, Object obj)
653  {
654  int indent = Convert.ToInt32(obj);
655  this.printIndentation(indent);
656  this.output.Write("UnaryExpression ");
657  switch (node.Operator)
658  {
659  case UnaryOperator.BitwiseNot: this.output.Write("~"); break;
660  case UnaryOperator.Minus: this.output.Write("-"); break;
661  case UnaryOperator.Not: this.output.Write("!"); break;
662  case UnaryOperator.Plus: this.output.Write("+"); break;
663  case UnaryOperator.PostfixDecrement:
664  case UnaryOperator.PrefixDecrement: this.output.Write("--"); break;
665  case UnaryOperator.PostfixIncrement:
666  case UnaryOperator.PrefixIncrement: this.output.Write("++"); break;
667  }
668  this.output.WriteLine("Type: {0} [{1}:{2}]", printType(node.ExpressionType), node.Location.Line, node.Location.Column);
669  node.Operand.Accept(this, indent + 1);
670 
671  //if (node.MoveStat != null)
672  // node.MoveStat.Accept(this, obj);
673  return null;
674  }
675 
676  #endregion
677 
678  // Literales
679 
680  #region Visit(BaseExpression node, Object obj)
681 
682  public override Object Visit(BaseExpression node, Object obj)
683  {
684  this.printIndentation(Convert.ToInt32(obj));
685  this.output.WriteLine("base Type: {0} [{1}:{2}]", printType(node.ExpressionType), node.Location.Line, node.Location.Column);
686  return null;
687  }
688 
689  #endregion
690 
691  #region Visit(BoolLiteralExpression node, Object obj)
692 
693  public override Object Visit(BoolLiteralExpression node, Object obj)
694  {
695  this.printIndentation(Convert.ToInt32(obj));
696  this.output.WriteLine("{0} Type: {1} [{2}:{3}]", node.BoolValue, printType(node.ExpressionType), node.Location.Line, node.Location.Column);
697  return null;
698  }
699 
700  #endregion
701 
702  #region Visit(CharLiteralExpression node, Object obj)
703 
704  public override Object Visit(CharLiteralExpression node, Object obj)
705  {
706  this.printIndentation(Convert.ToInt32(obj));
707  this.output.WriteLine("{0} Type: {1} [{2}:{3}]", node.CharValue, printType(node.ExpressionType), node.Location.Line, node.Location.Column);
708  return null;
709  }
710 
711  #endregion
712 
713  #region Visit(DoubleLiteralExpression node, Object obj)
714 
715  public override Object Visit(DoubleLiteralExpression node, Object obj)
716  {
717  this.printIndentation(Convert.ToInt32(obj));
718  this.output.WriteLine("{0} Type: {1} [{2}:{3}]", node.DoubleValue, printType(node.ExpressionType), node.Location.Line, node.Location.Column);
719  return null;
720  }
721 
722  #endregion
723 
724  #region Visit(IntLiteralExpression node, Object obj)
725 
726  public override Object Visit(IntLiteralExpression node, Object obj)
727  {
728  this.printIndentation(Convert.ToInt32(obj));
729  this.output.WriteLine("{0} Type: {1} [{2}:{3}]", node.IntValue, printType(node.ExpressionType), node.Location.Line, node.Location.Column);
730  return null;
731  }
732 
733  #endregion
734 
735  #region Visit(NullExpression node, Object obj)
736 
737  public override Object Visit(NullExpression node, Object obj)
738  {
739  this.printIndentation(Convert.ToInt32(obj));
740  this.output.WriteLine("null Type: {0} [{1}:{2}]", printType(node.ExpressionType), node.Location.Line, node.Location.Column);
741  return null;
742  }
743 
744  #endregion
745 
746  #region Visit(SingleIdentifierExpression node, Object obj)
747 
748  public override Object Visit(SingleIdentifierExpression node, Object obj)
749  {
750  this.printIndentation(Convert.ToInt32(obj));
751  if (node.IndexOfSSA != -1)
752  this.output.WriteLine("{0}{1} Type: {2} [{3}:{4}]", node.Identifier, node.IndexOfSSA, printType(node.ExpressionType), node.Location.Line, node.Location.Column);
753  else
754  this.output.WriteLine("{0} Type: {1} [{2}:{3}]", node.Identifier, printType(node.ExpressionType), node.Location.Line, node.Location.Column);
755  return null;
756  }
757 
758  #endregion
759 
760  #region Visit(StringLiteralExpression node, Object obj)
761 
762  public override Object Visit(StringLiteralExpression node, Object obj)
763  {
764  this.printIndentation(Convert.ToInt32(obj));
765  this.output.WriteLine("{0} Type: {1} [{2}:{3}]", node.StringValue, printType(node.ExpressionType), node.Location.Line, node.Location.Column);
766  return null;
767  }
768 
769  #endregion
770 
771  #region Visit(ThisExpression node, Object obj)
772 
773  public override Object Visit(ThisExpression node, Object obj)
774  {
775  this.printIndentation(Convert.ToInt32(obj));
776  this.output.WriteLine("this Type: {0} [{1}:{2}]", printType(node.ExpressionType), node.Location.Line, node.Location.Column);
777  return null;
778  }
779 
780  #endregion
781 
782  // Statements
783 
784  #region Visit(BreakStatement node, Object obj)
785 
786  public override Object Visit(BreakStatement node, Object obj)
787  {
788  this.printIndentation(Convert.ToInt32(obj));
789  this.output.WriteLine("break [{0}:{1}]", node.Location.Line, node.Location.Column);
790  return null;
791  }
792 
793  #endregion
794 
795  #region Visit(CatchStatement node, Object obj)
796 
797  public override Object Visit(CatchStatement node, Object obj)
798  {
799  int indent = Convert.ToInt32(obj);
800  this.printIndentation(indent);
801  this.output.WriteLine("CatchStatement [{0}:{1}]", node.Location.Line, node.Location.Column);
802  node.Exception.Accept(this, indent + 1);
803  node.Statements.Accept(this, indent + 1);
804  return null;
805  }
806 
807  #endregion
808 
809  #region Visit(ContinueStatement node, Object obj)
810 
811  public override Object Visit(ContinueStatement node, Object obj)
812  {
813  this.printIndentation(Convert.ToInt32(obj));
814  this.output.WriteLine("continue [{0}:{1}]", node.Location.Line, node.Location.Column);
815  return null;
816  }
817 
818  #endregion
819 
820  #region Visit(DoStatement node, Object obj)
821 
822  public override Object Visit(DoStatement node, Object obj)
823  {
824  int indent = Convert.ToInt32(obj);
825  this.printIndentation(indent);
826  this.output.WriteLine("DoStatement [{0}:{1}]", node.Location.Line, node.Location.Column);
827  this.printIndentation(indent + 1);
828  this.output.WriteLine("Init");
829  for (int i = 0; i < node.InitDo.Count; i++)
830  {
831  node.InitDo[i].Accept(this, indent + 2);
832  }
833  this.printIndentation(indent + 1);
834  this.output.WriteLine("Before Body");
835  for (int i = 0; i < node.BeforeBody.Count; i++)
836  {
837  node.BeforeBody[i].Accept(this, indent + 2);
838  }
839  this.printIndentation(indent + 1);
840  this.output.WriteLine("Statements");
841  node.Statements.Accept(this, indent + 2);
842  this.printIndentation(indent + 1);
843  this.output.WriteLine("Condition");
844  node.Condition.Accept(this, indent + 2);
845  return null;
846  }
847 
848  #endregion
849 
850  #region Visit(ForeachStatement node, Object obj)
851 
852  public override Object Visit(ForeachStatement node, Object obj)
853  {
854  int indent = Convert.ToInt32(obj);
855  this.printIndentation(indent);
856  this.output.WriteLine("ForeachStatement [{0}:{1}]", node.Location.Line, node.Location.Column);
857  node.ForEachDeclaration.Accept(this, indent + 1);
858  node.ForeachExp.Accept(this, indent + 1);
859  node.ForeachBlock.Accept(this, indent + 1);
860  return null;
861  }
862 
863  #endregion
864 
865  #region Visit(ForStatement node, Object obj)
866 
867  public override Object Visit(ForStatement node, Object obj)
868  {
869  int indent = Convert.ToInt32(obj);
870  this.printIndentation(indent);
871  this.output.WriteLine("ForStatement [{0}:{1}]", node.Location.Line, node.Location.Column);
872  this.printIndentation(indent + 1);
873  this.output.WriteLine("Initialization");
874  for (int i = 0; i < node.InitializerCount; i++)
875  {
876  node.GetInitializerElement(i).Accept(this, indent + 2);
877  }
878  this.printIndentation(indent + 1);
879  this.output.WriteLine("After initialization");
880  for (int i = 0; i < node.AfterInit.Count; i++)
881  {
882  node.AfterInit[i].Accept(this, indent + 2);
883  }
884  this.printIndentation(indent + 1);
885  this.output.WriteLine("Before condition");
886  for (int i = 0; i < node.BeforeCondition.Count; i++)
887  {
888  node.BeforeCondition[i].Accept(this, indent + 2);
889  }
890  this.printIndentation(indent + 1);
891  this.output.WriteLine("Condition");
892  node.Condition.Accept(this, indent + 2);
893 
894  this.printIndentation(indent + 1);
895  this.output.WriteLine("After condition");
896  for (int i = 0; i < node.AfterCondition.Count; i++)
897  {
898  node.AfterCondition[i].Accept(this, indent + 2);
899  }
900  this.printIndentation(indent + 1);
901  this.output.WriteLine("Statements");
902  node.Statements.Accept(this, indent + 2);
903 
904  this.printIndentation(indent + 1);
905  this.output.WriteLine("Iterators");
906  for (int i = 0; i < node.IteratorCount; i++)
907  {
908  node.GetIteratorElement(i).Accept(this, indent + 2);
909  }
910 
911  return null;
912  }
913 
914  #endregion
915 
916  #region Visit(IfElseStatement node, Object obj)
917 
918  public override Object Visit(IfElseStatement node, Object obj)
919  {
920  int indent = Convert.ToInt32(obj);
921  this.printIndentation(indent);
922  this.output.WriteLine("IfElseStatement [{0}:{1}]", node.Location.Line, node.Location.Column);
923  this.printIndentation(indent + 1);
924  this.output.WriteLine("Condition");
925  node.Condition.Accept(this, indent + 2);
926  this.printIndentation(indent + 1);
927  this.output.WriteLine("After Condition");
928  for (int i = 0; i < node.AfterCondition.Count; i++)
929  {
930  node.AfterCondition[i].Accept(this, indent + 2);
931  }
932  this.printIndentation(indent + 1);
933  this.output.WriteLine("True branch");
934  node.TrueBranch.Accept(this, indent + 2);
935  this.printIndentation(indent + 1);
936  this.output.WriteLine("False branch");
937  node.FalseBranch.Accept(this, indent + 2);
938  this.printIndentation(indent + 1);
939  this.output.WriteLine("Theta functions");
940  for (int i = 0; i < node.ThetaStatements.Count; i++)
941  {
942  node.ThetaStatements[i].Accept(this, indent + 2);
943  }
944  return null;
945  }
946 
947  #endregion
948 
949  #region Visit(ReturnStatement node, Object obj)
950 
951  public override Object Visit(ReturnStatement node, Object obj)
952  {
953  int indent = Convert.ToInt32(obj);
954  node.Assigns.Accept(this, indent);
955  this.printIndentation(indent);
956  this.output.WriteLine("ReturnStatement [{0}:{1}]", node.Location.Line, node.Location.Column);
957  if (node.ReturnExpression != null)
958  return node.ReturnExpression.Accept(this, indent + 1);
959  return null;
960  }
961 
962  #endregion
963 
964  #region Visit(SwitchLabel node, Object obj)
965 
966  public override Object Visit(SwitchLabel node, Object obj)
967  {
968  int indent = Convert.ToInt32(obj);
969  this.printIndentation(indent);
970  if (node.SwitchSectionType == SectionType.Case)
971  {
972  this.output.WriteLine("Case [{0}:{1}]", node.Location.Line, node.Location.Column);
973  node.Condition.Accept(this, indent + 1);
974  }
975  else
976  this.output.WriteLine("Default [{0}:{1}]", node.Location.Line, node.Location.Column);
977  return null;
978  }
979 
980  #endregion
981 
982  #region Visit(SwitchSection node, Object obj)
983 
984  public override Object Visit(SwitchSection node, Object obj)
985  {
986  int indent = Convert.ToInt32(obj);
987  this.printIndentation(indent);
988  this.output.WriteLine("Switch section [{0}:{1}]", node.Location.Line, node.Location.Column);
989  this.printIndentation(indent + 1);
990  this.output.WriteLine("Switch label");
991  for (int i = 0; i < node.LabelSection.Count; i++)
992  {
993  node.LabelSection[i].Accept(this, indent + 2);
994  }
995  this.printIndentation(indent + 1);
996  this.output.WriteLine("Statements");
997  for (int i = 0; i < node.SwitchBlock.StatementCount; i++)
998  {
999  node.SwitchBlock.GetStatementElement(i).Accept(this, indent + 2);
1000  }
1001  return null;
1002  }
1003 
1004  #endregion
1005 
1006  #region Visit(SwitchStatement node, Object obj)
1007 
1008  public override Object Visit(SwitchStatement node, Object obj)
1009  {
1010  int indent = Convert.ToInt32(obj);
1011  this.printIndentation(indent);
1012  this.output.WriteLine("SwitchStatement [{0}:{1}]", node.Location.Line, node.Location.Column);
1013  this.printIndentation(indent + 1);
1014  this.output.WriteLine("Condition");
1015  node.Condition.Accept(this, indent + 2);
1016  this.printIndentation(indent + 1);
1017  this.output.WriteLine("After Condition");
1018  for (int i = 0; i < node.AfterCondition.Count; i++)
1019  {
1020  node.AfterCondition[i].Accept(this, indent + 2);
1021  }
1022  this.printIndentation(indent + 1);
1023  this.output.WriteLine("Switch block");
1024  for (int i = 0; i < node.SwitchBlockCount; i++)
1025  {
1026  node.GetSwitchSectionElement(i).Accept(this, indent + 2);
1027  }
1028  this.printIndentation(indent + 1);
1029  this.output.WriteLine("Theta functions");
1030  for (int i = 0; i < node.ThetaStatements.Count; i++)
1031  {
1032  node.ThetaStatements[i].Accept(this, indent + 2);
1033  }
1034  return null;
1035  }
1036 
1037  #endregion
1038 
1039  #region Visit(ThrowStatement node, Object obj)
1040 
1041  public override Object Visit(ThrowStatement node, Object obj)
1042  {
1043  int indent = Convert.ToInt32(obj);
1044  this.printIndentation(indent);
1045  this.output.WriteLine("ThrowStatement [{0}:{1}]", node.Location.Line, node.Location.Column);
1046  if (node.ThrowExpression == null)
1047  return null;
1048  return node.ThrowExpression.Accept(this, indent + 1);
1049  }
1050 
1051  #endregion
1052 
1053  #region Visit(ExceptionManagementStatement node, Object obj)
1054 
1055  public override Object Visit(ExceptionManagementStatement node, Object obj)
1056  {
1057  int indent = Convert.ToInt32(obj);
1058  this.printIndentation(indent);
1059  this.output.WriteLine("TryStatement [{0}:{1}]", node.Location.Line, node.Location.Column);
1060  node.TryBlock.Accept(this, indent + 1);
1061  this.printIndentation(indent);
1062  this.output.WriteLine("Catch [{0}:{1}]", node.Location.Line, node.Location.Column);
1063  for (int i = 0; i < node.CatchCount; i++)
1064  {
1065  node.GetCatchElement(i).Accept(this, indent + 1);
1066  }
1067  if (node.FinallyBlock != null) {
1068  this.printIndentation(indent);
1069  this.output.WriteLine("Finally [{0}:{1}]", node.Location.Line, node.Location.Column);
1070  node.FinallyBlock.Accept(this, indent + 1);
1071  }
1072  return null;
1073  }
1074 
1075  #endregion
1076 
1077  #region Visit(WhileStatement node, Object obj)
1078 
1079  public override Object Visit(WhileStatement node, Object obj)
1080  {
1081  int indent = Convert.ToInt32(obj);
1082  this.printIndentation(indent);
1083  this.output.WriteLine("WhileStatement [{0}:{1}]", node.Location.Line, node.Location.Column);
1084  this.printIndentation(indent + 1);
1085  this.output.WriteLine("Init");
1086  for (int i = 0; i < node.InitWhile.Count; i++)
1087  {
1088  node.InitWhile[i].Accept(this, indent + 2);
1089  }
1090  this.printIndentation(indent + 1);
1091  this.output.WriteLine("Before Condition");
1092  for (int i = 0; i < node.BeforeCondition.Count; i++)
1093  {
1094  node.BeforeCondition[i].Accept(this, indent + 2);
1095  }
1096  this.printIndentation(indent + 1);
1097  this.output.WriteLine("Condition");
1098  node.Condition.Accept(this, indent + 2);
1099  this.printIndentation(indent + 1);
1100  this.output.WriteLine("After Condition");
1101  for (int i = 0; i < node.AfterCondition.Count; i++)
1102  {
1103  node.AfterCondition[i].Accept(this, indent + 2);
1104  }
1105  this.printIndentation(indent + 1);
1106  this.output.WriteLine("Statements");
1107  node.Statements.Accept(this, indent + 2);
1108  return null;
1109  }
1110 
1111  #endregion
1112 
1113  #region Visit(MoveStatement node, Object obj)
1114 
1115  public override Object Visit(MoveStatement node, Object obj)
1116  {
1117  this.printIndentation(Convert.ToInt32(obj));
1118 
1119  if (node.LeftExp.IndexOfSSA != -1)
1120  this.output.Write("{0}{1}", node.LeftExp.Identifier, node.LeftExp.IndexOfSSA);
1121  else
1122  this.output.Write("{0}", node.LeftExp.Identifier);
1123 
1124  this.output.Write(" ({0})", printType(node.LeftExp.ExpressionType));
1125  this.output.Write(" <-- ");
1126 
1127  if (node.RightExp.IndexOfSSA != -1)
1128  this.output.Write("{0}{1}", node.RightExp.Identifier, node.RightExp.IndexOfSSA);
1129  else
1130  this.output.Write("{0}", node.RightExp.Identifier);
1131 
1132  this.output.WriteLine(" ({0})", printType(node.RightExp.ExpressionType));
1133 
1134  if (node.MoveStat != null)
1135  node.MoveStat.Accept(this, obj);
1136  return null;
1137  }
1138 
1139  #endregion
1140 
1141  #region Visit(ThetaStatement node, Object obj)
1142 
1143  public override Object Visit(ThetaStatement node, Object obj)
1144  {
1145  this.printIndentation(Convert.ToInt32(obj));
1146  this.output.Write("{0}{1} = 0(", node.ThetaId.Identifier, node.ThetaId.IndexOfSSA);
1147  for (int i = 0; i < node.ThetaList.Count - 1; i++)
1148  {
1149  if (node.ThetaList[i].IndexOfSSA != -1)
1150  this.output.Write("{0}{1}", node.ThetaList[i].Identifier, node.ThetaList[i].IndexOfSSA);
1151  else
1152  this.output.Write("{0}", node.ThetaList[i].Identifier);
1153 
1154  this.output.Write(" ({0}), ", printType(node.ThetaList[i].ExpressionType));
1155  }
1156 
1157  if (node.ThetaList[node.ThetaList.Count - 1].IndexOfSSA != -1)
1158  this.output.Write("{0}{1}", node.ThetaList[node.ThetaList.Count - 1].Identifier, node.ThetaList[node.ThetaList.Count - 1].IndexOfSSA);
1159  else
1160  this.output.Write("{0}", node.ThetaList[node.ThetaList.Count - 1].Identifier);
1161 
1162  this.output.WriteLine(" ({0}))", printType(node.ThetaList[node.ThetaList.Count - 1].ExpressionType));
1163 
1164  return null;
1165  }
1166 
1167  #endregion
1168  }
1169 }
Encapsulates a Return statement of our programming languages.
Encapsulates a &#39;base&#39; expression.
Encapsulates a definition of a concrete method.
override Object Visit(ThetaStatement node, Object obj)
override Object Visit(IdDeclaration node, Object obj)
Encapsulates a Break statement of our programming languages.
Encapsulates the qualified name expression.
Encapsulates a Case statement of our programming languages.
override Object Visit(IsExpression node, Object obj)
Statement GetBlock
Gets the statements associated to the get accessor.
Encapsulates a Do statement of our programming language.
Definition: DoStatement.cs:34
Encapsulates a string literal expression.
Encapsulates the expression to access a field.
override Object Visit(SingleIdentifierExpression node, Object obj)
AssignmentOperator Operator
Gets the operator of the binary expression
override Object Visit(CatchStatement node, Object obj)
Encapsulates a namespace definition.
Definition: Namespace.cs:35
Encapsulates a Catch statement of our programming languages.
Encapsulates a logical binary expression.
Encapsulates a invocation expression.
Encapsulates a boolean literal expression.
Encapsulates a cast expression.
Encapsulates a definition of a concrete field.
TypeExpression ExpressionType
Gets or sets the type of the expression.
Definition: Expression.cs:71
SectionType SwitchSectionType
Gets the type of the Case statement (case or default)
Definition: SwitchLabel.cs:77
override Object Visit(ArithmeticExpression node, Object obj)
override Object Visit(ForStatement node, Object obj)
override Object Visit(BitwiseExpression node, Object obj)
MoveStatement MoveStat
Gets or sets a move statement associated to the assignment expression.
override Object Visit(FieldDefinition node, Object obj)
override Object Visit(NewArrayExpression node, Object obj)
override Object Visit(IntLiteralExpression node, Object obj)
Encapsulates a constant field definition.
override Object Visit(PropertyDefinition node, Object obj)
Encapsulates a definition.
Definition: Definition.cs:36
override Object Visit(SwitchStatement node, Object obj)
Encapsulates arithmetic binary expressions.
SingleIdentifierExpression RightExp
Gets the right expression
Abstract class that represents all different types.
RelationalOperator Operator
Gets the operator of the binary expression
Encapsulates a For statement of our programming languages.
Definition: ForStatement.cs:34
Encapsulates a While statement of our programming languages.
override Object Visit(ExceptionManagementStatement node, Object obj)
Encapsulates a null expression.
Encapsulates a Is expression.
Definition: IsExpression.cs:35
Encapsulates a definition of a concrete interface.
Encapsulates a switch label (Case + condition or Default section).
Definition: SwitchLabel.cs:47
override Object Visit(DoStatement node, Object obj)
Encapsulates a identifier expression of our programming language.
override Object Visit(StringLiteralExpression node, Object obj)
override Object Visit(LogicalExpression node, Object obj)
override Object Visit(Namespace node, Object obj)
Encapsulates a declaration of a concrete method.
override Object Visit(InterfaceDefinition node, Object obj)
override Object Visit(NewExpression node, Object obj)
override Object Visit(ContinueStatement node, Object obj)
Encapsulates a Theta function to use in SSA algorithm.
Expression ThrowExpression
Gets the throw expression.
Abstract class to define different visits over the abstract syntax tree. It makes a deep walker...
TypeExpression TypeExpr
Gets the type to check with the expression.
Definition: IsExpression.cs:71
Encapsulates a relational binary expression.
Encapsulates a bitwise binary expression.
override Object Visit(FieldAccessExpression node, Object obj)
SingleIdentifierExpression IdentifierExp
Gets the identifier expression
Encapsulates assignment binary expressions.
override Object Visit(BaseCallExpression node, Object obj)
CompoundExpression Init
Gets or sets the array initialization
override Object Visit(ForeachStatement node, Object obj)
Encapsulates a ternary expression of our programming language.
Encapsulates a If-Else statement of our programming language.
override Object Visit(ArrayAccessExpression node, Object obj)
Encapsulates a new array expression.
Encapsulates a definition of a concrete constructor.
override Object Visit(QualifiedIdentifierExpression node, Object obj)
MoveStatement MoveStat
Gets or sets a move statement associated to the current move statement.
override Object Visit(SwitchSection node, Object obj)
override Object Visit(BreakStatement node, Object obj)
Encapsulates the source code.
Definition: SourceFile.cs:35
override Object Visit(FieldDeclaration node, Object obj)
Encapsulates a Try-Catch-finally statement of our programming languages. As C# states catch blcok and...
override Object Visit(DoubleLiteralExpression node, Object obj)
Encapsulates a string literal expression.
This class shows the information of the abstract syntax tree.
Definition: VisitorDebug.cs:34
SingleIdentifierExpression LeftExp
Gets the left expression
override Object Visit(ClassDefinition node, Object obj)
Encapsulates a declaration.
Encapsulates a argument expression of our programming language.
VisitorDebug(TextWriter writer)
Constructor of VisitorDebug
Definition: VisitorDebug.cs:51
int IndexOfSSA
Gets or sets the index associated with SSA algorithm
Encapsulates a &#39;this&#39; expression.
override Object Visit(CastExpression node, Object obj)
Encapsulates a unary expression of our programming language.
List< SingleIdentifierExpression > ThetaList
Gets the parameter of theta funcion
override Object Visit(TernaryExpression node, Object obj)
override Object Visit(ThrowStatement node, Object obj)
override Object Visit(Definition node, Object obj)
BitwiseOperator Operator
Gets the operator of the binary expression
override Object Visit(MethodDefinition node, Object obj)
override Object Visit(ReturnStatement node, Object obj)
Expression Size
Gets or sets the array size
override Object Visit(ConstantFieldDefinition node, Object obj)
LogicalOperator Operator
Gets the operator of the binary expression
override Object Visit(ThisExpression node, Object obj)
InvocationExpression Initialization
Gets the base or this initialization of the constructor definition
Expression ReturnExpression
Gets the return expression.
override Object Visit(IfElseStatement node, Object obj)
SectionType
Indicates if it is a case statement or a default case.
Definition: SwitchLabel.cs:31
override Object Visit(WhileStatement node, Object obj)
Encapsulates a integer literal expression.
Encapsulates a declaration of a concrete field.
override Object Visit(InvocationExpression node, Object obj)
Encapsulates a constant definition.
Encapsulates the array expression to access the concrete position.
ArithmeticOperator Operator
Gets the operator of the binary expression
Block FinallyBlock
Gets the statements executed in Finally block. if there is no finally statementes can be null ...
override Object Visit(ConstructorDefinition node, Object obj)
Encapsulates a Move instruction to use in SSA algorithm
override Object Visit(ArgumentExpression node, Object obj)
override Object Visit(BoolLiteralExpression node, Object obj)
Encapsulates a Continue statement of our programming languages.
override Object Visit(ConstantDefinition node, Object obj)
override Object Visit(BaseExpression node, Object obj)
UnaryOperator Operator
Gets the operator of the unary operation
Statement SetBlock
Gets the statements associated to the set accessor.
override Object Visit(MoveStatement node, Object obj)
Encapsulates a Throw statement of our programming languages.
override Object Visit(RelationalExpression node, Object obj)
Encapsulates a Foreach statement of our programming languages.
Encapsulates a invocation expression to base class.
Encapsulates a new expression.
override Object Visit(MethodDeclaration node, Object obj)
Encapsulates a property definition.
Encapsulates a definition of a concrete class.
override Object Visit(CharLiteralExpression node, Object obj)
override Object Visit(SwitchLabel node, Object obj)
TypeExpression TypeExpr
Gets or sets the type of the declaration
Definition: Declaration.cs:63
Encapsulates a Switch statement of our programming languages.
override Object Visit(UnaryExpression node, Object obj)
override Object Visit(NullExpression node, Object obj)
override Object Visit(SourceFile node, Object obj)
Definition: VisitorDebug.cs:77
override Object Visit(AssignmentExpression node, Object obj)