27 lines
421 B
C++
27 lines
421 B
C++
#pragma once
|
|
#include "prelude/string.hpp"
|
|
|
|
namespace IR
|
|
{
|
|
|
|
class Value
|
|
{
|
|
public:
|
|
Value(unsigned int id) : m_id(id) {}
|
|
Value() : m_id(0) {}
|
|
public:
|
|
StringView Format() const
|
|
{
|
|
auto sb = StringBuilder();
|
|
sb.AppendFormat("%%%d", m_id);
|
|
return sb.view();
|
|
}
|
|
private:
|
|
unsigned int m_id;
|
|
};
|
|
|
|
using ValueView = View<Value>;
|
|
using ValueBuilder = Builder<Value>;
|
|
|
|
} // namespace IR
|