public override string AST(int depth = 0) { return($"{Spaces(depth)}[{Name} {(Reference ? "Ref" : "")}\n" + $"{Id.AST(depth + 1)}" + $"{Type.AST(depth + 1)}" + $"{Spaces(depth)}]\n"); }
public override string AST(int depth = 0) { return($"{Spaces(depth)}[{Name}\n" + (Type != null ? $"{Type.AST(depth + 1)}" : "") + $"{Spaces(depth + 1)}[{Token.Content}]\n" + $"{Spaces(depth)}]\n"); }
public override string AST(int depth = 0) { return($"{Spaces(depth)}[{Name}\n" + (Type != null ? $"{Type.AST(depth + 1)}" : "") + $"{Spaces(depth + 1)}[\"{Value}\"]\n" + $"{Spaces(depth)}]\n"); }
public override string AST(int depth = 0) { return($"{Spaces(depth)}[{Name}\n" + $"{Type.AST(depth + 1)}" + $"{Spaces(depth + 1)}[{Op}]\n" + $"{Left.AST(depth + 1)}{Right.AST(depth + 1)}{Spaces(depth)}]\n"); }
public override string AST(int depth = 0) { return($"{Spaces(depth)}[{Name}\n" + $"{Type.AST(depth + 1)}" + $"{LValue.AST(depth + 1)}" + $"{Spaces(depth)}]\n"); }
public override string AST(int depth = 0) { return($"{Spaces(depth)}[{Name}\n" + (Type != null ? $"{Type.AST(depth + 1)}" : "") + //$"{Id.AST(depth + 1)}{Expression.AST(depth + 1)}{Spaces(depth)}]\n"; $"{LValue.AST(depth + 1)}{Expression.AST(depth + 1)}{Spaces(depth)}]\n"); }
public override string AST(int depth = 0) { var sb = new StringBuilder($"{Spaces(depth)}[{Name}\n"); foreach (var a in Ids) { sb.Append(a.AST(depth + 1)); } sb.Append(Type != null ? $"{Type.AST(depth + 1)}" : ""); sb.Append($"{Spaces(depth)}]\n"); return(sb.ToString()); }
public override string AST(int depth = 0) { var sb = new StringBuilder($"{Spaces(depth)}[{Name}\n" + (Type != null ? $"{Type.AST(depth + 1)}" : "") + $"{Id.AST(depth + 1)}"); foreach (var s in Parameters) { sb.Append(s.AST(depth + 1)); } sb.Append($"{Statement.AST(depth + 1)}{Spaces(depth)}]\n"); return(sb.ToString()); }