mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +00:00
LibCpp: Import definitions from headers while processing
When the preprocessor encounters an #include statement it now adds the preprocessor definitions that exist in the included header to its own set of definitions. We previously only aggregated the definitions from headers after processing the source, which was less correct. (For example, there could be an #ifdef that depends on a definition from another header).
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
|
||||
namespace Cpp {
|
||||
|
||||
Parser::Parser(Vector<Token> const& tokens, const String& filename, Preprocessor::Definitions&& definitions)
|
||||
Parser::Parser(Vector<Token> const& tokens, const String& filename, Preprocessor::Definitions const& definitions)
|
||||
: m_preprocessor_definitions(move(definitions))
|
||||
, m_filename(filename)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user