Skip to content

Commit 2883dbb

Browse files
Add ToolInvocation symbolic structure (#110)
1 parent 6a73c55 commit 2883dbb

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

include/ifc/abstract-sgraph.hxx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,7 @@ namespace ifc {
751751
Form, // FormIndex heap
752752
Attr, // AttrIndex heap
753753
Dir, // DirIndex heap
754+
String, // TextOffset heap.
754755
Vendor, // VendorIndex heap
755756
Count
756757
};
@@ -3022,6 +3023,12 @@ namespace ifc {
30223023
// Sequence of one or more attributes.
30233024
struct TupleAttr : Tag<AttrSort::Tuple>, Sequence<AttrIndex, HeapSort::Attr> {};
30243025

3026+
// -- Tool invocation
3027+
struct ToolInvocation {
3028+
TextOffset cmd; // The invoked command.
3029+
Sequence<TextOffset> args; // The arguments to the command.
3030+
};
3031+
30253032
namespace microsoft {
30263033
enum class PragmaCommentSort : std::uint8_t {
30273034
Unknown,

src/sgraph.cxx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,10 +332,19 @@ namespace ifc {
332332
static_assert(retractible_by_key(macro_sort_table));
333333

334334
constexpr SortNameMapEntry<HeapSort> heapsort_table[] = {
335-
{HeapSort::Decl, "heap.decl"}, {HeapSort::Type, "heap.type"}, {HeapSort::Stmt, "heap.stmt"},
336-
{HeapSort::Expr, "heap.expr"}, {HeapSort::Syntax, "heap.syn"}, {HeapSort::Word, "heap.word"},
337-
{HeapSort::Chart, "heap.chart"}, {HeapSort::Spec, "heap.spec"}, {HeapSort::Form, "heap.pp"},
338-
{HeapSort::Attr, "heap.attr"}, {HeapSort::Dir, "heap.dir"}, {HeapSort::Vendor, "heap.vendor"},
335+
{HeapSort::Decl, "heap.decl"},
336+
{HeapSort::Type, "heap.type"},
337+
{HeapSort::Stmt, "heap.stmt"},
338+
{HeapSort::Expr, "heap.expr"},
339+
{HeapSort::Syntax, "heap.syn"},
340+
{HeapSort::Word, "heap.word"},
341+
{HeapSort::Chart, "heap.chart"},
342+
{HeapSort::Spec, "heap.spec"},
343+
{HeapSort::Form, "heap.pp"},
344+
{HeapSort::Attr, "heap.attr"},
345+
{HeapSort::Dir, "heap.dir"},
346+
{HeapSort::String, "heap.string"},
347+
{HeapSort::Vendor, "heap.vendor"},
339348
};
340349

341350
static_assert(retractible_by_key(heapsort_table));

0 commit comments

Comments
 (0)