summaryrefslogtreecommitdiff
path: root/src/expand/cfg.hpp
blob: 5050a229a04238e38af3f8227776b9b9be77e2c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/*
 * MRustC - Mutabah's Rust Compiler
 * - By John Hodge (Mutabah/thePowersGang)
 *
 * expand/cfg.hpp
 * - Handling of `#[cfg]` and `cfg!` conditions
 */

#pragma once

#include <ast/attrs.hpp>

extern void Cfg_SetFlag(::std::string name);
extern void Cfg_SetValue(::std::string name, ::std::string val);
extern void Cfg_SetValueCb(::std::string name, ::std::function<bool(const ::std::string&)> cb);
extern bool check_cfg(const Span& sp, const ::AST::Attribute& mi);