summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ast-dump.h
blob: 4bf2a3985c6759cc642131c9453649f64021269d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// slang-ast-dump.h
#ifndef SLANG_AST_DUMP_H
#define SLANG_AST_DUMP_H

#include "slang-emit-source-writer.h"
#include "slang-syntax.h"

namespace Slang
{

struct ASTDumpAccess;

struct ASTDumpUtil
{
    enum class Style
    {
        Hierachical,
        Flat,
    };

    typedef uint32_t Flags;
    struct Flag
    {
        enum Enum : Flags
        {
            HideSourceLoc = 0x1,
            HideScope = 0x2,
        };
    };

    static void dump(NodeBase* node, Style style, Flags flags, SourceWriter* writer);
};

} // namespace Slang

#endif