14 n[gp::Node::NodeType::kRoot] =
"root";
15 n[gp::Node::NodeType::kInclude] =
"include";
16 n[gp::Node::NodeType::kIdentifier] =
"identifier";
17 n[gp::Node::NodeType::kProperty] =
"property";
18 n[gp::Node::NodeType::kOperation] =
"operation";
19 n[gp::Node::NodeType::kValue] =
"value";
20 n[gp::Node::NodeType::kAssign] =
"assign";
21 n[gp::Node::NodeType::kEqual] =
"equal";
22 n[gp::Node::NodeType::kPlusEqual] =
"plus_equal";
23 n[gp::Node::NodeType::kMinusEqual] =
"minus_equal";
24 n[gp::Node::NodeType::kVector] =
"vector";
25 n[gp::Node::NodeType::kMap] =
"map";
26 n[gp::Node::NodeType::kPair] =
"pair";
27 n[gp::Node::NodeType::kSimple] =
"simple";
28 n[gp::Node::NodeType::kString] =
"string";
29 n[gp::Node::NodeType::kReal] =
"real";
30 n[gp::Node::NodeType::kBool] =
"bool";
31 n[gp::Node::NodeType::kUnits] =
"units";
32 n[gp::Node::NodeType::kUnit] =
"unit";
33 n[gp::Node::NodeType::kCondition] =
"condition";
34 n[gp::Node::NodeType::kIfdef] =
"ifdef";
35 n[gp::Node::NodeType::kIfndef] =
"ifndef";
36 n[gp::Node::NodeType::kElse] =
"else";
37 n[gp::Node::NodeType::kPrintOptions] =
"print_options";
38 n[gp::Node::NodeType::kPrintOn] =
"print_on";
39 n[gp::Node::NodeType::kPrintOff] =
"print_off";
40 n[gp::Node::NodeType::kShell] =
"shell";
41 n[gp::Node::NodeType::kPrintTree] =
"print_tree";
42 n[gp::Node::NodeType::kDumpFile] =
"dump_file";
43 n[gp::Node::NodeType::kPropertyRef] =
"property_ref";
59 result +=
"<" +
name();
60 if ( !value.empty() ) result +=
" value=\"" + value +
"\"";
61 if ( position.line() != 0 ) result +=
" line=\"" +
std::to_string( position.line() ) +
"\"";
62 if ( position.column() != 0 ) result +=
" column=\"" +
std::to_string( position.column() ) +
"\"";
63 if ( children.empty() ) {
67 [&](
std::string s,
const gp::Node& node ) {
return s + node.ToString( indent + 2 ); } )
68 .append(
' ', indent ) +
69 "</" +
name() +
">\n";
std::vector< std::string > init_names()