Goose  Artifact [02228243ac]

Artifact 02228243acb2cd3f9df066480ffac3fe756ecebef29d967a9d454c987850d7b1:

  • File bs/ir/tostring.h — part of check-in [2efa23555d] at 2019-08-11 01:26:17 on branch trunk —
    • ir: created a new type for LocationId which is handled in a specific way so that two LocationIds are always considered equal by pattern matching. This prevent the values' locationIds stored in ir expressions from fucking up everything.
    • propagate value locations in a few places: in the parser, when resolving invocations and when doing eager evaluation. There are probably a lot of other places still missing.
    • converted all the builtin statements to use the DiagnosticsManager.
    (user: achavasse size: 792)

#ifndef EMPATHY_IR_TOSTRING_H
#define EMPATHY_IR_TOSTRING_H

namespace empathy::ir
{
    class Vector;
    enum class Delimiter;

    extern ostream& ToString( ostream& out, const uint32_t& x );
    extern ostream& ToString( ostream& out, const LocationId& x );
    extern ostream& ToString( ostream& out, const string& x );
    extern ostream& ToString( ostream& out, const StringId& x );
    extern ostream& ToString( ostream& out, const Delimiter& x );
    extern ostream& ToString( ostream& out, const ptr< void >& x );
    extern ostream& ToString( ostream& out, const void* x );
    extern ostream& ToString( ostream& out, const ptr< Vector >& v );

    extern ostream& ToString( ostream& out, const BigInt& t );
    extern ostream& ToString( ostream& out, const APSInt& t );
}

#endif