Пример #1
0
        public override string VisitDirective(AstDirective dir, int data = 0)
        {
            var name = "#" + dir.Name.Accept(this);

            if (dir.Arguments.Count > 0)
            {
                name += $"({string.Join(", ", dir.Arguments.Select(a => a.Accept(this)))})";
            }
            return(name);
        }
Пример #2
0
        public string VisitDirective(AstDirective dir)
        {
            var name = "#" + dir.Name.Accept(rawPrinter);

            if (dir.Arguments.Count > 0)
            {
                name += $"({string.Join(", ", dir.Arguments.Select(a => a.Accept(rawPrinter)))})";
            }
            return(name);
        }
Пример #3
0
 public bool TryGetDirective(string name, out AstDirective dir)
 {
     dir = Directives.FirstOrDefault(d => d.Name.Name == name);
     return(dir != null);
 }
Пример #4
0
 public virtual ReturnType VisitDirective(AstDirective dir, DataType data   = default) => default;
Пример #5
0
 public AstDirectiveStatement(AstDirective Directive, ILocation Location = null) : base(Location: Location)
 {
     this.Directive = Directive;
 }