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); }
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); }
public bool TryGetDirective(string name, out AstDirective dir) { dir = Directives.FirstOrDefault(d => d.Name.Name == name); return(dir != null); }
public virtual ReturnType VisitDirective(AstDirective dir, DataType data = default) => default;
public AstDirectiveStatement(AstDirective Directive, ILocation Location = null) : base(Location: Location) { this.Directive = Directive; }