various: format with clang-format
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ib9abc9d2dcd036d3680c5aa3dc919bfa6a6a6964
This commit is contained in:
parent
63a9eddc49
commit
ea20aaab00
12 changed files with 1923 additions and 1819 deletions
|
|
@ -2,44 +2,44 @@
|
|||
#define NIX_IRC_IR_GEN_H
|
||||
|
||||
#include "types.h"
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
namespace nix_irc {
|
||||
|
||||
class IRGenerator {
|
||||
public:
|
||||
IRGenerator();
|
||||
~IRGenerator();
|
||||
|
||||
void set_string_table(const std::unordered_map<std::string, uint32_t>& table);
|
||||
uint32_t add_string(const std::string& str);
|
||||
|
||||
std::shared_ptr<Node> generate(const std::shared_ptr<Node>& ast);
|
||||
|
||||
IRGenerator();
|
||||
~IRGenerator();
|
||||
|
||||
void set_string_table(const std::unordered_map<std::string, uint32_t>& table);
|
||||
uint32_t add_string(const std::string& str);
|
||||
|
||||
std::shared_ptr<Node> generate(const std::shared_ptr<Node>& ast);
|
||||
|
||||
private:
|
||||
struct Impl;
|
||||
std::unique_ptr<Impl> pImpl;
|
||||
struct Impl;
|
||||
std::unique_ptr<Impl> pImpl;
|
||||
};
|
||||
|
||||
class NameResolver {
|
||||
public:
|
||||
NameResolver();
|
||||
~NameResolver();
|
||||
|
||||
void enter_scope();
|
||||
void exit_scope();
|
||||
void bind(const std::string& name);
|
||||
uint32_t resolve(const std::string& name);
|
||||
bool is_bound(const std::string& name) const;
|
||||
|
||||
NameResolver();
|
||||
~NameResolver();
|
||||
|
||||
void enter_scope();
|
||||
void exit_scope();
|
||||
void bind(const std::string& name);
|
||||
uint32_t resolve(const std::string& name);
|
||||
bool is_bound(const std::string& name) const;
|
||||
|
||||
private:
|
||||
struct Impl;
|
||||
std::unique_ptr<Impl> pImpl;
|
||||
struct Impl;
|
||||
std::unique_ptr<Impl> pImpl;
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace nix_irc
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue