From 967be9e750221ab2ab783f95df79bb26d290a45e Mon Sep 17 00:00:00 2001 From: Martial Simon Date: Mon, 15 Sep 2025 01:07:58 +0200 Subject: add: added projects --- tiger-compiler/src/assert/desugar-visitor.hxx | 39 +++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 tiger-compiler/src/assert/desugar-visitor.hxx (limited to 'tiger-compiler/src/assert/desugar-visitor.hxx') diff --git a/tiger-compiler/src/assert/desugar-visitor.hxx b/tiger-compiler/src/assert/desugar-visitor.hxx new file mode 100644 index 0000000..9e839c1 --- /dev/null +++ b/tiger-compiler/src/assert/desugar-visitor.hxx @@ -0,0 +1,39 @@ +/** + ** \file assert/desugar-visitor.hxx + ** \brief Implementation of assert::DesugarVisitor (inlined methods). + */ + +#pragma once + +#include + +#include +#include + +#include + +namespace assert +{ + + inline std::string + DesugarVisitor::get_formatted_assert_cond(const ast::AssertExp& e) + { + std::stringstream stream{}; + ast::PrettyPrinter pretty_printer(stream); + + pretty_printer(e.cond_get()); + + return stream.str(); + } + + inline std::string + DesugarVisitor::get_formatted_location(const ast::Location& loc) + { + std::stringstream stream{}; + + stream << loc; + + return stream.str(); + } + +} -- cgit v1.2.3