diff --git a/nixd/include/nixd/Syntax/Nodes.inc b/nixd/include/nixd/Syntax/Nodes.inc index 550d79356..3035d1665 100644 --- a/nixd/include/nixd/Syntax/Nodes.inc +++ b/nixd/include/nixd/Syntax/Nodes.inc @@ -22,7 +22,7 @@ NODE(Formals, { }) NODE(Function, { Identifier *Arg; - Formals *Formals; + Formals *FunctionFormals; Node *Body; COMMON_METHOD }) @@ -131,7 +131,7 @@ NODE(Attribute, { }) NODE(InheritedAttribute, { - Attrs *Attrs; + Attrs *InheritedAttrs; Node *E; COMMON_METHOD }) @@ -139,7 +139,7 @@ NODE(InheritedAttribute, { NODE(Select, { Node *Body; - AttrPath *AttrPath; + AttrPath *Path; /// expr1 '.' attrpath 'or' expr2 /// expr2 is the default value if we cannot select @@ -167,13 +167,13 @@ NODE(Braced, { }) NODE(AttrSet, { - Binds *Binds; + Binds *AttrBinds; bool Recursive; COMMON_METHOD }) NODE(LegacyLet, { - Binds *Binds; + Binds *AttrBinds; COMMON_METHOD }) diff --git a/nixd/lib/Syntax/Parser/Parser.y b/nixd/lib/Syntax/Parser/Parser.y index d62e07146..d6c838ed1 100644 --- a/nixd/lib/Syntax/Parser/Parser.y +++ b/nixd/lib/Syntax/Parser/Parser.y @@ -104,21 +104,21 @@ expr_function : identifier ':' expr_function { auto N = decorateNode(new Function, yylloc, *Data); N->Arg = $1; - N->Formals = nullptr; + N->FunctionFormals = nullptr; N->Body = $3; $$ = N; } | '{' formals '}' ':' expr_function { auto N = decorateNode(new Function, yylloc, *Data); N->Arg = nullptr; - N->Formals = $2; + N->FunctionFormals = $2; N->Body = $5; $$ = N; } | '{' formals '}' '@' identifier ':' expr_function { auto N = decorateNode(new Function, yylloc, *Data); N->Arg = $5; - N->Formals = $2; + N->FunctionFormals = $2; N->Body = $7; $$ = N; } @@ -210,14 +210,14 @@ expr_select : expr_simple '.' attrpath { auto N = decorateNode(new Select, yylloc, *Data); N->Body = $1; - N->AttrPath = $3; + N->Path = $3; N->Default = nullptr; $$ = N; } | expr_simple '.' attrpath OR_KW expr_select { auto N = decorateNode(new Select, yylloc, *Data); N->Body = $1; - N->AttrPath = $3; + N->Path = $3; N->Default = $5; $$ = N; } @@ -266,18 +266,18 @@ expr_simple } | LET '{' binds '}' { auto N = decorateNode(new LegacyLet, yylloc, *Data); - N->Binds = $3; + N->AttrBinds = $3; $$ = N; } | REC '{' binds '}' { auto N = decorateNode(new AttrSet, yylloc, *Data); - N->Binds = $3; + N->AttrBinds = $3; N->Recursive = true; $$ = N; } | '{' binds '}' { auto N = decorateNode(new AttrSet, yylloc, *Data); - N->Binds = $2; + N->AttrBinds = $2; N->Recursive = false; $$ = N; } @@ -401,12 +401,12 @@ binds inherited_attribute : INHERIT attrs ';' { $$ = decorateNode(new InheritedAttribute, yylloc, *Data); - $$->Attrs = $2; + $$->InheritedAttrs = $2; $$->E = nullptr; } | INHERIT '(' expr ')' attrs ';' { $$ = decorateNode(new InheritedAttribute, yylloc, *Data); - $$->Attrs = $5; + $$->InheritedAttrs = $5; $$->E = $3; }