Branch data Line data Source code
1 : : /****************************************************************************** 2 : : * This file is part of the cvc5 project. 3 : : * 4 : : * Copyright (c) 2009-2026 by the authors listed in the file AUTHORS 5 : : * in the top-level source directory and their institutional affiliations. 6 : : * All rights reserved. See the file COPYING in the top-level source 7 : : * directory for licensing information. 8 : : * **************************************************************************** 9 : : * 10 : : * Implementation for parsed operators. 11 : : */ 12 : : 13 : : #include "parser/parse_op.h" 14 : : 15 : : namespace cvc5 { 16 : : 17 : 0 : std::ostream& operator<<(std::ostream& os, const ParseOp& p) 18 : : { 19 : 0 : std::stringstream out; 20 : 0 : out << "(ParseOp"; 21 [ - - ]: 0 : if (!p.d_expr.isNull()) 22 : : { 23 : 0 : out << " :expr " << p.d_expr; 24 : : } 25 [ - - ]: 0 : if (p.d_kind != cvc5::Kind::NULL_TERM) 26 : : { 27 : 0 : out << " :kind " << p.d_kind; 28 : : } 29 [ - - ]: 0 : if (!p.d_name.empty()) 30 : : { 31 : 0 : out << " :name " << p.d_name; 32 : : } 33 [ - - ]: 0 : if (!p.d_indices.empty()) 34 : : { 35 : 0 : out << " :indices ["; 36 : 0 : bool first = true; 37 [ - - ]: 0 : for (uint32_t index : p.d_indices) 38 : : { 39 [ - - ]: 0 : if (!first) 40 : : { 41 : 0 : out << ", "; 42 : : } 43 : 0 : first = false; 44 : 0 : out << index; 45 : : } 46 : 0 : out << "]"; 47 : : } 48 : 0 : out << ")"; 49 : 0 : return os << out.str(); 50 : 0 : } 51 : : 52 : : } // namespace cvc5