mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:47:46 +00:00
LibCpp: Replace defined preprocessor values when parsing
This commit is contained in:
parent
f21af0922a
commit
3658c4c567
8 changed files with 134 additions and 44 deletions
|
@ -41,14 +41,17 @@ public:
|
|||
const String& processed_text();
|
||||
Vector<StringView> included_paths() const { return m_included_paths; }
|
||||
|
||||
private:
|
||||
struct DefinedValue {
|
||||
Optional<StringView> value;
|
||||
};
|
||||
using Definitions = HashMap<StringView, DefinedValue>;
|
||||
|
||||
const Definitions& definitions() const { return m_definitions; }
|
||||
|
||||
private:
|
||||
void handle_preprocessor_line(const StringView&);
|
||||
|
||||
HashMap<StringView, DefinedValue> m_definitions;
|
||||
Definitions m_definitions;
|
||||
const StringView m_program;
|
||||
StringBuilder m_builder;
|
||||
Vector<StringView> m_lines;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue