@@ -64,15 +64,15 @@ extractor_messages(
64
64
);
65
65
66
66
parent(
67
- int parent : @ast ref,
68
- int child : @ast ref
67
+ int child : @ast ref,
68
+ int parent : @ast ref
69
69
);
70
70
71
71
/* AST Nodes */
72
72
// This is all the kinds of nodes that can inherit from Ast
73
73
// https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.language.ast?view=powershellsdk-7.3.0
74
74
@ast = @not_implemented | @attribute_base | @catch_clause | @command_element |
75
- @member | @named_block | @param_block | @parameter | @redirection | @script_block | @statement | @statement_block;
75
+ @member | @named_block | @param_block | @parameter | @redirection | @script_block | @statement | @statement_block | @named_attribute_argument ;
76
76
// https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.language.attributebaseast?view=powershellsdk-7.2.0
77
77
@attribute_base = @attribute | @type_constraint;
78
78
@@ -409,13 +409,13 @@ if_statement(
409
409
if_statement_clause(
410
410
int id: @if_statement ref,
411
411
int index: int ref,
412
- int item1: @ast ref,
413
- int item2: @ast ref
412
+ int item1: @pipeline_base ref,
413
+ int item2: @statement_block ref
414
414
)
415
415
416
416
if_statement_else(
417
417
int id: @if_statement ref,
418
- int elseItem: @ast ref
418
+ int elseItem: @statement_block ref
419
419
)
420
420
421
421
if_statement_location(
@@ -467,7 +467,7 @@ statement_block_trap(
467
467
// https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.language.subexpressionast?view=powershellsdk-7.3.0
468
468
sub_expression(
469
469
unique int id: @sub_expression,
470
- int subExpression: @ast ref
470
+ int subExpression: @statement_block ref
471
471
)
472
472
473
473
sub_expression_location(
@@ -627,7 +627,7 @@ exit_statement(
627
627
628
628
exit_statement_pipeline(
629
629
int id: @exit_statement ref,
630
- int expression: @ast ref
630
+ int expression: @pipeline_base ref
631
631
)
632
632
633
633
exit_statement_location(
@@ -814,7 +814,7 @@ continue_statement_location(
814
814
815
815
statement_label(
816
816
int id: @labelled_statement ref,
817
- int label: @ast ref
817
+ int label: @expression ref
818
818
)
819
819
820
820
// ReturnStatementAst
@@ -825,7 +825,7 @@ return_statement(
825
825
826
826
return_statement_pipeline(
827
827
int id: @return_statement ref,
828
- int pipeline: @ast ref
828
+ int pipeline: @pipeline_base ref
829
829
)
830
830
831
831
return_statement_location(
@@ -837,12 +837,12 @@ return_statement_location(
837
837
// https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.language.dowhilestatementast?view=powershellsdk-7.3.0
838
838
do_while_statement(
839
839
unique int id: @do_while_statement,
840
- int body: @ast ref
840
+ int body: @statement_block ref
841
841
)
842
842
843
843
do_while_statement_condition(
844
844
int id: @do_while_statement ref,
845
- int condition: @ast ref
845
+ int condition: @pipeline_base ref
846
846
)
847
847
848
848
do_while_statement_location(
@@ -854,12 +854,12 @@ do_while_statement_location(
854
854
// https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.language.dountilstatementast?view=powershellsdk-7.3.0
855
855
do_until_statement(
856
856
unique int id: @do_until_statement,
857
- int body: @ast ref
857
+ int body: @statement_block ref
858
858
)
859
859
860
860
do_until_statement_condition(
861
861
int id: @do_until_statement ref,
862
- int condition: @ast ref
862
+ int condition: @pipeline_base ref
863
863
)
864
864
865
865
do_until_statement_location(
@@ -871,12 +871,12 @@ do_until_statement_location(
871
871
// https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.language.whilestatementast?view=powershellsdk-7.3.0
872
872
while_statement(
873
873
unique int id: @while_statement,
874
- int body: @ast ref
874
+ int body: @statement_block ref
875
875
)
876
876
877
877
while_statement_condition(
878
878
int id: @while_statement ref,
879
- int condition: @ast ref
879
+ int condition: @pipeline_base ref
880
880
)
881
881
882
882
while_statement_location(
@@ -888,9 +888,9 @@ while_statement_location(
888
888
// https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.language.foreachstatementast?view=powershellsdk-7.3.0
889
889
foreach_statement(
890
890
unique int id: @foreach_statement,
891
- int variable: @ast ref,
892
- int condition: @ast ref,
893
- int body: @ast ref,
891
+ int variable: @variable_expression ref,
892
+ int condition: @pipeline_base ref,
893
+ int body: @statement_block ref,
894
894
int flags: int ref
895
895
)
896
896
@@ -903,7 +903,7 @@ foreach_statement_location(
903
903
// https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.language.forstatementast?view=powershellsdk-7.3.0
904
904
for_statement(
905
905
unique int id: @for_statement,
906
- int body: @ast ref
906
+ int body: @statement_block ref
907
907
)
908
908
909
909
for_statement_location(
@@ -913,17 +913,17 @@ for_statement_location(
913
913
914
914
for_statement_condition(
915
915
int id: @for_statement ref,
916
- int condition: @ast ref
916
+ int condition: @pipeline_base ref
917
917
)
918
918
919
919
for_statement_initializer(
920
920
int id: @for_statement ref,
921
- int initializer: @ast ref
921
+ int initializer: @pipeline_base ref
922
922
)
923
923
924
924
for_statement_iterator(
925
925
int id: @for_statement ref,
926
- int iterator: @ast ref
926
+ int iterator: @pipeline_base ref
927
927
)
928
928
929
929
// ExpandableStringExpressionAst
@@ -988,14 +988,14 @@ unary_expression_location(
988
988
// https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.language.catchclauseast?view=powershellsdk-7.3.0
989
989
catch_clause(
990
990
unique int id: @catch_clause,
991
- int body: @ast ref,
991
+ int body: @statement_block ref,
992
992
boolean isCatchAll: boolean ref
993
993
)
994
994
995
995
catch_clause_catch_type(
996
996
int id: @catch_clause ref,
997
997
int index: int ref,
998
- int catch_type: @ast ref
998
+ int catch_type: @type_constraint ref
999
999
)
1000
1000
1001
1001
catch_clause_location(
@@ -1024,7 +1024,7 @@ throw_statement_pipeline(
1024
1024
// https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.language.trystatementast?view=powershellsdk-7.3.0
1025
1025
try_statement(
1026
1026
unique int id: @try_statement,
1027
- int body: @ast ref
1027
+ int body: @statement_block ref
1028
1028
)
1029
1029
1030
1030
try_statement_catch_clause(
@@ -1099,9 +1099,9 @@ token_location(
1099
1099
// https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.language.configurationdefinitionast?view=powershellsdk-7.3.0
1100
1100
configuration_definition(
1101
1101
unique int id: @configuration_definition,
1102
- int body: @ast ref,
1102
+ int body: @script_block_expression ref,
1103
1103
int configurationType: int ref,
1104
- int name: @ast ref
1104
+ int name: @expression ref
1105
1105
)
1106
1106
1107
1107
configuration_definition_location(
@@ -1113,7 +1113,7 @@ configuration_definition_location(
1113
1113
// https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.language.datastatementast?view=powershellsdk-7.3.0
1114
1114
data_statement(
1115
1115
unique int id: @data_statement,
1116
- int body: @ast ref
1116
+ int body: @statement_block ref
1117
1117
)
1118
1118
1119
1119
data_statement_variable(
0 commit comments