mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 23:56:06 +00:00
LibCpp: Replace defined preprocessor values when parsing
This commit is contained in:
parent
f21af0922a
commit
3658c4c567
Notes:
sideshowbarker
2024-07-18 21:26:09 +09:00
Author: https://github.com/itamar8910
Commit: 3658c4c567
Pull-request: https://github.com/SerenityOS/serenity/pull/5755
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