From cbf960a4fef40d064f3ab7e1d4e5a9daf4acc1cb Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Mon, 29 Dec 2025 14:13:35 -0800 Subject: [PATCH] Add `ToolInvocation` symbolic structure --- include/ifc/abstract-sgraph.hxx | 7 +++++++ src/sgraph.cxx | 17 +++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/include/ifc/abstract-sgraph.hxx b/include/ifc/abstract-sgraph.hxx index 1fd124c..4406ea0 100644 --- a/include/ifc/abstract-sgraph.hxx +++ b/include/ifc/abstract-sgraph.hxx @@ -751,6 +751,7 @@ namespace ifc { Form, // FormIndex heap Attr, // AttrIndex heap Dir, // DirIndex heap + String, // TextOffset heap. Vendor, // VendorIndex heap Count }; @@ -3022,6 +3023,12 @@ namespace ifc { // Sequence of one or more attributes. struct TupleAttr : Tag, Sequence {}; + // -- Tool invocation + struct ToolInvocation { + TextOffset cmd; // The invoked command. + Sequence args; // The arguments to the command. + }; + namespace microsoft { enum class PragmaCommentSort : std::uint8_t { Unknown, diff --git a/src/sgraph.cxx b/src/sgraph.cxx index 6922381..3b96660 100644 --- a/src/sgraph.cxx +++ b/src/sgraph.cxx @@ -332,10 +332,19 @@ namespace ifc { static_assert(retractible_by_key(macro_sort_table)); constexpr SortNameMapEntry heapsort_table[] = { - {HeapSort::Decl, "heap.decl"}, {HeapSort::Type, "heap.type"}, {HeapSort::Stmt, "heap.stmt"}, - {HeapSort::Expr, "heap.expr"}, {HeapSort::Syntax, "heap.syn"}, {HeapSort::Word, "heap.word"}, - {HeapSort::Chart, "heap.chart"}, {HeapSort::Spec, "heap.spec"}, {HeapSort::Form, "heap.pp"}, - {HeapSort::Attr, "heap.attr"}, {HeapSort::Dir, "heap.dir"}, {HeapSort::Vendor, "heap.vendor"}, + {HeapSort::Decl, "heap.decl"}, + {HeapSort::Type, "heap.type"}, + {HeapSort::Stmt, "heap.stmt"}, + {HeapSort::Expr, "heap.expr"}, + {HeapSort::Syntax, "heap.syn"}, + {HeapSort::Word, "heap.word"}, + {HeapSort::Chart, "heap.chart"}, + {HeapSort::Spec, "heap.spec"}, + {HeapSort::Form, "heap.pp"}, + {HeapSort::Attr, "heap.attr"}, + {HeapSort::Dir, "heap.dir"}, + {HeapSort::String, "heap.string"}, + {HeapSort::Vendor, "heap.vendor"}, }; static_assert(retractible_by_key(heapsort_table));