jak-project/goalc/compiler/Label.h
2020-09-13 21:36:35 -04:00

16 lines
318 B
C++

#pragma once
#ifndef JAK_LABEL_H
#define JAK_LABEL_H
class FunctionEnv;
struct Label {
Label() = default;
Label(FunctionEnv* f, int _idx = -1) : func(f), idx(_idx) {}
FunctionEnv* func = nullptr;
int idx = -1;
std::string print() const { return "label-" + std::to_string(idx); }
};
#endif // JAK_LABEL_H