feat(preprocessor): date & time macro (#92)

This commit is contained in:
Edo
2023-03-29 14:45:50 +01:00
committed by GitHub
parent e05d853ba6
commit 15526ab79a
3 changed files with 26 additions and 3 deletions

View File

@ -22,6 +22,8 @@ class preprocessor
std::set<std::string> reject_;
std::deque<token> tokens_;
std::vector<token> expr_;
std::string date_;
std::string time_;
usize curr_expr_;
u32 expand_;
u32 skip_;
@ -81,6 +83,8 @@ private:
auto eval_expr_factor() -> i32;
auto eval_expr_unary() -> i32;
auto eval_expr_primary() -> i32;
auto get_date_define(std::tm* time_p) -> void;
auto get_time_define(std::tm* time_p) -> void;
};
} // namespace xsk::gsc

View File

@ -6,6 +6,7 @@
#pragma once
#include <cstdio>
#include <ctime>
#include <algorithm>
#include <array>