Beispiel #1
0
        public void Visit(Config config, SyntaxNode node)
        {
            int padding = node.Ancestors().Count();
            //To identify leaf nodes vs nodes with children
            string prepend = node.ChildNodes().Any() ? "[-]" : "[.]";
            //Get the type of the node
            string line = new string(' ', padding) + prepend +
                          " " + node.GetType().ToString() + " " + (node as SyntaxNode).GetText();

            //Write the line
            _logger.LogDebug(line);

            _codeVisitor.Visit(config, node);

            base.Visit(node);
        }
Beispiel #2
0
 public override void Accept(ICodeVisitor visitor)
 {
     visitor.Visit(this);
 }
Beispiel #3
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="visitor"></param>
 public override void Dispatch(ICodeVisitor visitor) {
   visitor.Visit(this);
 }
Beispiel #4
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="visitor"></param>
 public void Dispatch(ICodeVisitor visitor) {
   visitor.Visit(this);
 }
Beispiel #5
0
 public override void Dispatch(ICodeVisitor visitor)
 {
     visitor.Visit(this); // do not go to base.Dispatch because it will not do anything for const decls
 }
Beispiel #6
0
 public override void Dispatch(ICodeVisitor visitor)
 {
     visitor.Visit(this);
 }
Beispiel #7
0
 public override void Dispatch(ICodeVisitor visitor)
 {
     visitor.Visit(this); // do not go to base.Dispatch because it will not do anything for const decls
 }
Beispiel #8
0
 /// <summary>
 /// Calls visitor.Visit(INamedArgument).
 /// </summary>
 public override void Dispatch(ICodeVisitor visitor)
 {
     visitor.Visit((INamedArgument)this);
 }
Beispiel #9
0
 /// <summary>
 /// Calls visitor.Visit(ICreateArray).
 /// </summary>
 public override void Dispatch(ICodeVisitor visitor)
 {
     visitor.Visit((ICreateArray)this);
 }
Beispiel #10
0
 /// <summary>
 /// Calls visitor.Visit(ICompileTimeConstant).
 /// </summary>
 public override void Dispatch(ICodeVisitor visitor)
 {
     visitor.Visit((ICompileTimeConstant)this);
 }