class
#include <slang/ast/ASTSerializer.h>
ASTSerializer A class that serializes AST nodes to JSON.
Constructors, destructors, conversion operators
- ASTSerializer(Compilation& compilation, JsonWriter& writer)
- Constructs a new instance of the ASTSerializer class.
Public functions
- void setIncludeAddresses(bool set)
- Sets a flag that indicates whether the addresses of AST objects should be included in the JSON output.
- void setIncludeSourceInfo(bool set)
- Sets a flag that indicates whether source line and file information should be included in the JSON output.
- void serialize(const Symbol& symbol, bool inMembersArray = false)
- Serializes a symbol to JSON.
- void serialize(const Expression& expr)
- Serializes an expression to JSON.
- void serialize(const Statement& statement)
- Serializes a statement to JSON.
- void serialize(const TimingControl& timing)
- Serializes a timing control to JSON.
- void serialize(const Constraint& constraint)
- Serializes a constraint to JSON.
- void serialize(const AssertionExpr& assertionExpr)
- Serializes an assertion expression to JSON.
- void serialize(const BinsSelectExpr& binsSelectExpr)
- Serializes a bin select expression to JSON.
- void serialize(const Pattern& pattern)
- Serializes a pattern to JSON.
-
void serialize(std::
string_view value) - Serializes the given verbatim string to JSON.
- void startArray()
- Starts a new array in the serialized output.
-
void startArray(std::
string_view name) - Starts a new array property with the given name in the serialized output.
- void endArray()
- Ends a previously started array.
- void startObject()
- Starts a new object in the serialized output.
- void endObject()
- Ends the previously started object.
-
void writeProperty(std::
string_view name) - Writes a property with the given name but no value (it is expected that you will write the value next).
-
void write(std::
string_view name, std:: string_view value) - Writes a property with the given value to the serialized output.
-
void write(std::
string_view name, int64_ t value) - Writes a property with the given value to the serialized output.
-
void write(std::
string_view name, uint64_ t value) - Writes a property with the given value to the serialized output.
-
void write(std::
string_view name, double value) - Writes a property with the given value to the serialized output.
-
void write(std::
string_view name, bool value) - Writes a property with the given value to the serialized output.
-
void write(std::
string_view name, const std:: string& value) - Writes a property with the given value to the serialized output.
-
void write(std::
string_view name, const Symbol& value) - Writes a property with the given value to the serialized output.
-
void write(std::
string_view name, const ConstantValue& value) - Writes a property with the given value to the serialized output.
-
void write(std::
string_view name, const Expression& value) - Writes a property with the given value to the serialized output.
-
void write(std::
string_view name, const Statement& value) - Writes a property with the given value to the serialized output.
-
void write(std::
string_view name, const TimingControl& value) - Writes a property with the given value to the serialized output.
-
void write(std::
string_view name, const Constraint& value) - Writes a property with the given value to the serialized output.
-
void write(std::
string_view name, const AssertionExpr& value) - Writes a property with the given value to the serialized output.
-
void write(std::
string_view name, const BinsSelectExpr& value) - Writes a property with the given value to the serialized output.
-
void write(std::
string_view name, const Pattern& value) - Writes a property with the given value to the serialized output.
-
void writeLink(std::
string_view name, const Symbol& value) - Writes a property with a link to the given symbol to the serialized output.
-
template<std::signed_integral T>void write(std::
string_view name, T value) - Writes a property with the given signed integral value to the serialized output.
-
template<std::unsigned_integral T>void write(std::
string_view name, T value) - Writes a property with the given unsigned integral value to the serialized output.
-
template<typename T>void write(std::
string_view name, T value) deleted - Writes a property with the given pointer value to the serialized output.
-
template<typename T>void write(std::
string_view name, not_ null<T> value) deleted - Writes a property with the given value to the serialized output.