Static specialization WIP
Fix in ScopeDescriptor 2
This commit is contained in:
@@ -319,7 +319,7 @@ begin
|
||||
// Check if we are unquoting a macro parameter (simple identifier)
|
||||
if expr.Kind = akIdentifier then
|
||||
begin
|
||||
symbol := FMacroScope.CreateDescriptor.FindSymbol(expr.AsIdentifier.Name);
|
||||
symbol := FMacroScope.Descriptor.FindSymbol(expr.AsIdentifier.Name);
|
||||
if (symbol.Address.Kind = akLocalOrParent) and (symbol.Address.ScopeDepth = 0) then
|
||||
begin
|
||||
// It's a parameter. Return the TDataValue containing the AST node passed as argument.
|
||||
@@ -519,7 +519,7 @@ begin
|
||||
begin
|
||||
// This is the compile-time evaluation (Binder + Evaluator)
|
||||
// [*] It must bind against the *expansion* scope, not the initial scope
|
||||
boundSubAst := TAstBinder.Bind(expansionScope.CreateDescriptor, ANodeToEvaluate, subDescriptor);
|
||||
boundSubAst := TAstBinder.Bind(expansionScope.Descriptor, ANodeToEvaluate, subDescriptor);
|
||||
|
||||
// Create eval scope from the new descriptor, parented to the expansion scope
|
||||
evalScope := subDescriptor.CreateScope(expansionScope);
|
||||
|
||||
Reference in New Issue
Block a user