prism 0.29.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +77 -1
- data/CONTRIBUTING.md +0 -4
- data/README.md +4 -0
- data/config.yml +498 -145
- data/docs/fuzzing.md +1 -1
- data/docs/parsing_rules.md +4 -1
- data/docs/ripper_translation.md +22 -0
- data/docs/serialization.md +3 -0
- data/ext/prism/api_node.c +2858 -2082
- data/ext/prism/extconf.rb +1 -1
- data/ext/prism/extension.c +203 -421
- data/ext/prism/extension.h +2 -2
- data/include/prism/ast.h +1732 -453
- data/include/prism/defines.h +36 -0
- data/include/prism/diagnostic.h +23 -6
- data/include/prism/node.h +0 -21
- data/include/prism/options.h +94 -3
- data/include/prism/parser.h +57 -28
- data/include/prism/regexp.h +18 -8
- data/include/prism/static_literals.h +3 -2
- data/include/prism/util/pm_char.h +1 -2
- data/include/prism/util/pm_constant_pool.h +0 -8
- data/include/prism/util/pm_integer.h +22 -15
- data/include/prism/util/pm_newline_list.h +11 -0
- data/include/prism/util/pm_string.h +28 -12
- data/include/prism/version.h +3 -3
- data/include/prism.h +0 -11
- data/lib/prism/compiler.rb +3 -0
- data/lib/prism/desugar_compiler.rb +111 -74
- data/lib/prism/dispatcher.rb +16 -1
- data/lib/prism/dot_visitor.rb +45 -34
- data/lib/prism/dsl.rb +660 -468
- data/lib/prism/ffi.rb +64 -6
- data/lib/prism/inspect_visitor.rb +294 -64
- data/lib/prism/lex_compat.rb +1 -1
- data/lib/prism/mutation_compiler.rb +11 -6
- data/lib/prism/node.rb +2469 -4973
- data/lib/prism/node_ext.rb +91 -14
- data/lib/prism/parse_result/comments.rb +0 -7
- data/lib/prism/parse_result/errors.rb +65 -0
- data/lib/prism/parse_result/newlines.rb +101 -11
- data/lib/prism/parse_result.rb +43 -3
- data/lib/prism/reflection.rb +10 -8
- data/lib/prism/serialize.rb +484 -609
- data/lib/prism/translation/parser/compiler.rb +152 -132
- data/lib/prism/translation/parser/lexer.rb +26 -4
- data/lib/prism/translation/parser.rb +9 -4
- data/lib/prism/translation/ripper.rb +22 -20
- data/lib/prism/translation/ruby_parser.rb +73 -13
- data/lib/prism/visitor.rb +3 -0
- data/lib/prism.rb +0 -4
- data/prism.gemspec +3 -5
- data/rbi/prism/dsl.rbi +521 -0
- data/rbi/prism/node.rbi +744 -4837
- data/rbi/prism/visitor.rbi +3 -0
- data/rbi/prism.rbi +36 -30
- data/sig/prism/dsl.rbs +190 -303
- data/sig/prism/mutation_compiler.rbs +1 -0
- data/sig/prism/node.rbs +759 -628
- data/sig/prism/parse_result.rbs +2 -0
- data/sig/prism/visitor.rbs +1 -0
- data/sig/prism.rbs +103 -64
- data/src/diagnostic.c +62 -28
- data/src/node.c +499 -1754
- data/src/options.c +76 -27
- data/src/prettyprint.c +156 -112
- data/src/prism.c +2773 -2081
- data/src/regexp.c +202 -69
- data/src/serialize.c +170 -50
- data/src/static_literals.c +63 -84
- data/src/token_type.c +4 -4
- data/src/util/pm_constant_pool.c +0 -8
- data/src/util/pm_integer.c +53 -25
- data/src/util/pm_newline_list.c +29 -0
- data/src/util/pm_string.c +130 -80
- data/src/util/pm_strpbrk.c +32 -6
- metadata +4 -6
- data/include/prism/util/pm_string_list.h +0 -44
- data/lib/prism/debug.rb +0 -249
- data/lib/prism/translation/parser/rubocop.rb +0 -73
- data/src/util/pm_string_list.c +0 -28
data/include/prism/ast.h
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
/*----------------------------------------------------------------------------*/
|
2
2
|
/* This file is generated by the templates/template.rb script and should not */
|
3
3
|
/* be modified manually. See */
|
4
4
|
/* templates/include/prism/ast.h.erb */
|
5
5
|
/* if you are looking to modify the */
|
6
6
|
/* template */
|
7
|
-
|
7
|
+
/*----------------------------------------------------------------------------*/
|
8
8
|
|
9
9
|
/**
|
10
10
|
* @file ast.h
|
@@ -831,194 +831,197 @@ enum pm_node_type {
|
|
831
831
|
/** InterpolatedXStringNode */
|
832
832
|
PM_INTERPOLATED_X_STRING_NODE = 87,
|
833
833
|
|
834
|
+
/** ItLocalVariableReadNode */
|
835
|
+
PM_IT_LOCAL_VARIABLE_READ_NODE = 88,
|
836
|
+
|
834
837
|
/** ItParametersNode */
|
835
|
-
PM_IT_PARAMETERS_NODE =
|
838
|
+
PM_IT_PARAMETERS_NODE = 89,
|
836
839
|
|
837
840
|
/** KeywordHashNode */
|
838
|
-
PM_KEYWORD_HASH_NODE =
|
841
|
+
PM_KEYWORD_HASH_NODE = 90,
|
839
842
|
|
840
843
|
/** KeywordRestParameterNode */
|
841
|
-
PM_KEYWORD_REST_PARAMETER_NODE =
|
844
|
+
PM_KEYWORD_REST_PARAMETER_NODE = 91,
|
842
845
|
|
843
846
|
/** LambdaNode */
|
844
|
-
PM_LAMBDA_NODE =
|
847
|
+
PM_LAMBDA_NODE = 92,
|
845
848
|
|
846
849
|
/** LocalVariableAndWriteNode */
|
847
|
-
PM_LOCAL_VARIABLE_AND_WRITE_NODE =
|
850
|
+
PM_LOCAL_VARIABLE_AND_WRITE_NODE = 93,
|
848
851
|
|
849
852
|
/** LocalVariableOperatorWriteNode */
|
850
|
-
PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE =
|
853
|
+
PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE = 94,
|
851
854
|
|
852
855
|
/** LocalVariableOrWriteNode */
|
853
|
-
PM_LOCAL_VARIABLE_OR_WRITE_NODE =
|
856
|
+
PM_LOCAL_VARIABLE_OR_WRITE_NODE = 95,
|
854
857
|
|
855
858
|
/** LocalVariableReadNode */
|
856
|
-
PM_LOCAL_VARIABLE_READ_NODE =
|
859
|
+
PM_LOCAL_VARIABLE_READ_NODE = 96,
|
857
860
|
|
858
861
|
/** LocalVariableTargetNode */
|
859
|
-
PM_LOCAL_VARIABLE_TARGET_NODE =
|
862
|
+
PM_LOCAL_VARIABLE_TARGET_NODE = 97,
|
860
863
|
|
861
864
|
/** LocalVariableWriteNode */
|
862
|
-
PM_LOCAL_VARIABLE_WRITE_NODE =
|
865
|
+
PM_LOCAL_VARIABLE_WRITE_NODE = 98,
|
863
866
|
|
864
867
|
/** MatchLastLineNode */
|
865
|
-
PM_MATCH_LAST_LINE_NODE =
|
868
|
+
PM_MATCH_LAST_LINE_NODE = 99,
|
866
869
|
|
867
870
|
/** MatchPredicateNode */
|
868
|
-
PM_MATCH_PREDICATE_NODE =
|
871
|
+
PM_MATCH_PREDICATE_NODE = 100,
|
869
872
|
|
870
873
|
/** MatchRequiredNode */
|
871
|
-
PM_MATCH_REQUIRED_NODE =
|
874
|
+
PM_MATCH_REQUIRED_NODE = 101,
|
872
875
|
|
873
876
|
/** MatchWriteNode */
|
874
|
-
PM_MATCH_WRITE_NODE =
|
877
|
+
PM_MATCH_WRITE_NODE = 102,
|
875
878
|
|
876
879
|
/** MissingNode */
|
877
|
-
PM_MISSING_NODE =
|
880
|
+
PM_MISSING_NODE = 103,
|
878
881
|
|
879
882
|
/** ModuleNode */
|
880
|
-
PM_MODULE_NODE =
|
883
|
+
PM_MODULE_NODE = 104,
|
881
884
|
|
882
885
|
/** MultiTargetNode */
|
883
|
-
PM_MULTI_TARGET_NODE =
|
886
|
+
PM_MULTI_TARGET_NODE = 105,
|
884
887
|
|
885
888
|
/** MultiWriteNode */
|
886
|
-
PM_MULTI_WRITE_NODE =
|
889
|
+
PM_MULTI_WRITE_NODE = 106,
|
887
890
|
|
888
891
|
/** NextNode */
|
889
|
-
PM_NEXT_NODE =
|
892
|
+
PM_NEXT_NODE = 107,
|
890
893
|
|
891
894
|
/** NilNode */
|
892
|
-
PM_NIL_NODE =
|
895
|
+
PM_NIL_NODE = 108,
|
893
896
|
|
894
897
|
/** NoKeywordsParameterNode */
|
895
|
-
PM_NO_KEYWORDS_PARAMETER_NODE =
|
898
|
+
PM_NO_KEYWORDS_PARAMETER_NODE = 109,
|
896
899
|
|
897
900
|
/** NumberedParametersNode */
|
898
|
-
PM_NUMBERED_PARAMETERS_NODE =
|
901
|
+
PM_NUMBERED_PARAMETERS_NODE = 110,
|
899
902
|
|
900
903
|
/** NumberedReferenceReadNode */
|
901
|
-
PM_NUMBERED_REFERENCE_READ_NODE =
|
904
|
+
PM_NUMBERED_REFERENCE_READ_NODE = 111,
|
902
905
|
|
903
906
|
/** OptionalKeywordParameterNode */
|
904
|
-
PM_OPTIONAL_KEYWORD_PARAMETER_NODE =
|
907
|
+
PM_OPTIONAL_KEYWORD_PARAMETER_NODE = 112,
|
905
908
|
|
906
909
|
/** OptionalParameterNode */
|
907
|
-
PM_OPTIONAL_PARAMETER_NODE =
|
910
|
+
PM_OPTIONAL_PARAMETER_NODE = 113,
|
908
911
|
|
909
912
|
/** OrNode */
|
910
|
-
PM_OR_NODE =
|
913
|
+
PM_OR_NODE = 114,
|
911
914
|
|
912
915
|
/** ParametersNode */
|
913
|
-
PM_PARAMETERS_NODE =
|
916
|
+
PM_PARAMETERS_NODE = 115,
|
914
917
|
|
915
918
|
/** ParenthesesNode */
|
916
|
-
PM_PARENTHESES_NODE =
|
919
|
+
PM_PARENTHESES_NODE = 116,
|
917
920
|
|
918
921
|
/** PinnedExpressionNode */
|
919
|
-
PM_PINNED_EXPRESSION_NODE =
|
922
|
+
PM_PINNED_EXPRESSION_NODE = 117,
|
920
923
|
|
921
924
|
/** PinnedVariableNode */
|
922
|
-
PM_PINNED_VARIABLE_NODE =
|
925
|
+
PM_PINNED_VARIABLE_NODE = 118,
|
923
926
|
|
924
927
|
/** PostExecutionNode */
|
925
|
-
PM_POST_EXECUTION_NODE =
|
928
|
+
PM_POST_EXECUTION_NODE = 119,
|
926
929
|
|
927
930
|
/** PreExecutionNode */
|
928
|
-
PM_PRE_EXECUTION_NODE =
|
931
|
+
PM_PRE_EXECUTION_NODE = 120,
|
929
932
|
|
930
933
|
/** ProgramNode */
|
931
|
-
PM_PROGRAM_NODE =
|
934
|
+
PM_PROGRAM_NODE = 121,
|
932
935
|
|
933
936
|
/** RangeNode */
|
934
|
-
PM_RANGE_NODE =
|
937
|
+
PM_RANGE_NODE = 122,
|
935
938
|
|
936
939
|
/** RationalNode */
|
937
|
-
PM_RATIONAL_NODE =
|
940
|
+
PM_RATIONAL_NODE = 123,
|
938
941
|
|
939
942
|
/** RedoNode */
|
940
|
-
PM_REDO_NODE =
|
943
|
+
PM_REDO_NODE = 124,
|
941
944
|
|
942
945
|
/** RegularExpressionNode */
|
943
|
-
PM_REGULAR_EXPRESSION_NODE =
|
946
|
+
PM_REGULAR_EXPRESSION_NODE = 125,
|
944
947
|
|
945
948
|
/** RequiredKeywordParameterNode */
|
946
|
-
PM_REQUIRED_KEYWORD_PARAMETER_NODE =
|
949
|
+
PM_REQUIRED_KEYWORD_PARAMETER_NODE = 126,
|
947
950
|
|
948
951
|
/** RequiredParameterNode */
|
949
|
-
PM_REQUIRED_PARAMETER_NODE =
|
952
|
+
PM_REQUIRED_PARAMETER_NODE = 127,
|
950
953
|
|
951
954
|
/** RescueModifierNode */
|
952
|
-
PM_RESCUE_MODIFIER_NODE =
|
955
|
+
PM_RESCUE_MODIFIER_NODE = 128,
|
953
956
|
|
954
957
|
/** RescueNode */
|
955
|
-
PM_RESCUE_NODE =
|
958
|
+
PM_RESCUE_NODE = 129,
|
956
959
|
|
957
960
|
/** RestParameterNode */
|
958
|
-
PM_REST_PARAMETER_NODE =
|
961
|
+
PM_REST_PARAMETER_NODE = 130,
|
959
962
|
|
960
963
|
/** RetryNode */
|
961
|
-
PM_RETRY_NODE =
|
964
|
+
PM_RETRY_NODE = 131,
|
962
965
|
|
963
966
|
/** ReturnNode */
|
964
|
-
PM_RETURN_NODE =
|
967
|
+
PM_RETURN_NODE = 132,
|
965
968
|
|
966
969
|
/** SelfNode */
|
967
|
-
PM_SELF_NODE =
|
970
|
+
PM_SELF_NODE = 133,
|
968
971
|
|
969
972
|
/** ShareableConstantNode */
|
970
|
-
PM_SHAREABLE_CONSTANT_NODE =
|
973
|
+
PM_SHAREABLE_CONSTANT_NODE = 134,
|
971
974
|
|
972
975
|
/** SingletonClassNode */
|
973
|
-
PM_SINGLETON_CLASS_NODE =
|
976
|
+
PM_SINGLETON_CLASS_NODE = 135,
|
974
977
|
|
975
978
|
/** SourceEncodingNode */
|
976
|
-
PM_SOURCE_ENCODING_NODE =
|
979
|
+
PM_SOURCE_ENCODING_NODE = 136,
|
977
980
|
|
978
981
|
/** SourceFileNode */
|
979
|
-
PM_SOURCE_FILE_NODE =
|
982
|
+
PM_SOURCE_FILE_NODE = 137,
|
980
983
|
|
981
984
|
/** SourceLineNode */
|
982
|
-
PM_SOURCE_LINE_NODE =
|
985
|
+
PM_SOURCE_LINE_NODE = 138,
|
983
986
|
|
984
987
|
/** SplatNode */
|
985
|
-
PM_SPLAT_NODE =
|
988
|
+
PM_SPLAT_NODE = 139,
|
986
989
|
|
987
990
|
/** StatementsNode */
|
988
|
-
PM_STATEMENTS_NODE =
|
991
|
+
PM_STATEMENTS_NODE = 140,
|
989
992
|
|
990
993
|
/** StringNode */
|
991
|
-
PM_STRING_NODE =
|
994
|
+
PM_STRING_NODE = 141,
|
992
995
|
|
993
996
|
/** SuperNode */
|
994
|
-
PM_SUPER_NODE =
|
997
|
+
PM_SUPER_NODE = 142,
|
995
998
|
|
996
999
|
/** SymbolNode */
|
997
|
-
PM_SYMBOL_NODE =
|
1000
|
+
PM_SYMBOL_NODE = 143,
|
998
1001
|
|
999
1002
|
/** TrueNode */
|
1000
|
-
PM_TRUE_NODE =
|
1003
|
+
PM_TRUE_NODE = 144,
|
1001
1004
|
|
1002
1005
|
/** UndefNode */
|
1003
|
-
PM_UNDEF_NODE =
|
1006
|
+
PM_UNDEF_NODE = 145,
|
1004
1007
|
|
1005
1008
|
/** UnlessNode */
|
1006
|
-
PM_UNLESS_NODE =
|
1009
|
+
PM_UNLESS_NODE = 146,
|
1007
1010
|
|
1008
1011
|
/** UntilNode */
|
1009
|
-
PM_UNTIL_NODE =
|
1012
|
+
PM_UNTIL_NODE = 147,
|
1010
1013
|
|
1011
1014
|
/** WhenNode */
|
1012
|
-
PM_WHEN_NODE =
|
1015
|
+
PM_WHEN_NODE = 148,
|
1013
1016
|
|
1014
1017
|
/** WhileNode */
|
1015
|
-
PM_WHILE_NODE =
|
1018
|
+
PM_WHILE_NODE = 149,
|
1016
1019
|
|
1017
1020
|
/** XStringNode */
|
1018
|
-
PM_X_STRING_NODE =
|
1021
|
+
PM_X_STRING_NODE = 150,
|
1019
1022
|
|
1020
1023
|
/** YieldNode */
|
1021
|
-
PM_YIELD_NODE =
|
1024
|
+
PM_YIELD_NODE = 151,
|
1022
1025
|
|
1023
1026
|
/** A special kind of node used for compilation. */
|
1024
1027
|
PM_SCOPE_NODE
|
@@ -1040,11 +1043,8 @@ typedef uint16_t pm_node_flags_t;
|
|
1040
1043
|
* We store the flags enum in every node in the tree. Some flags are common to
|
1041
1044
|
* all nodes (the ones listed below). Others are specific to certain node types.
|
1042
1045
|
*/
|
1043
|
-
|
1044
|
-
|
1045
|
-
static const pm_node_flags_t PM_NODE_FLAG_NEWLINE = (1 << (PM_NODE_FLAG_BITS - 1));
|
1046
|
-
static const pm_node_flags_t PM_NODE_FLAG_STATIC_LITERAL = (1 << (PM_NODE_FLAG_BITS - 2));
|
1047
|
-
static const pm_node_flags_t PM_NODE_FLAG_COMMON_MASK = (1 << (PM_NODE_FLAG_BITS - 1)) | (1 << (PM_NODE_FLAG_BITS - 2));
|
1046
|
+
static const pm_node_flags_t PM_NODE_FLAG_NEWLINE = 0x1;
|
1047
|
+
static const pm_node_flags_t PM_NODE_FLAG_STATIC_LITERAL = 0x2;
|
1048
1048
|
|
1049
1049
|
/**
|
1050
1050
|
* Cast the type to an enum to allow the compiler to provide exhaustiveness
|
@@ -1079,6 +1079,12 @@ typedef struct pm_node {
|
|
1079
1079
|
*/
|
1080
1080
|
pm_node_flags_t flags;
|
1081
1081
|
|
1082
|
+
/**
|
1083
|
+
* The unique identifier for this node, which is deterministic based on the
|
1084
|
+
* source. It is used to identify unique nodes across parses.
|
1085
|
+
*/
|
1086
|
+
uint32_t node_id;
|
1087
|
+
|
1082
1088
|
/**
|
1083
1089
|
* This is the location of the node in the source. It's a range of bytes
|
1084
1090
|
* containing a start and an end.
|
@@ -1089,7 +1095,12 @@ typedef struct pm_node {
|
|
1089
1095
|
/**
|
1090
1096
|
* AliasGlobalVariableNode
|
1091
1097
|
*
|
1092
|
-
*
|
1098
|
+
* Represents the use of the `alias` keyword to alias a global variable.
|
1099
|
+
*
|
1100
|
+
* alias $foo $bar
|
1101
|
+
* ^^^^^^^^^^^^^^^
|
1102
|
+
*
|
1103
|
+
* Type: ::PM_ALIAS_GLOBAL_VARIABLE_NODE
|
1093
1104
|
*
|
1094
1105
|
* @extends pm_node_t
|
1095
1106
|
*/
|
@@ -1097,10 +1108,11 @@ typedef struct pm_alias_global_variable_node {
|
|
1097
1108
|
/** The embedded base node. */
|
1098
1109
|
pm_node_t base;
|
1099
1110
|
|
1111
|
+
|
1100
1112
|
/**
|
1101
1113
|
* AliasGlobalVariableNode#new_name
|
1102
1114
|
*
|
1103
|
-
* Represents the new name of the global variable that can be used after aliasing.
|
1115
|
+
* Represents the new name of the global variable that can be used after aliasing.
|
1104
1116
|
*
|
1105
1117
|
* alias $foo $bar
|
1106
1118
|
* ^^^^
|
@@ -1110,7 +1122,7 @@ typedef struct pm_alias_global_variable_node {
|
|
1110
1122
|
/**
|
1111
1123
|
* AliasGlobalVariableNode#old_name
|
1112
1124
|
*
|
1113
|
-
* Represents the old name of the global variable that
|
1125
|
+
* Represents the old name of the global variable that can be used before aliasing.
|
1114
1126
|
*
|
1115
1127
|
* alias $foo $bar
|
1116
1128
|
* ^^^^
|
@@ -1131,7 +1143,12 @@ typedef struct pm_alias_global_variable_node {
|
|
1131
1143
|
/**
|
1132
1144
|
* AliasMethodNode
|
1133
1145
|
*
|
1134
|
-
*
|
1146
|
+
* Represents the use of the `alias` keyword to alias a method.
|
1147
|
+
*
|
1148
|
+
* alias foo bar
|
1149
|
+
* ^^^^^^^^^^^^^
|
1150
|
+
*
|
1151
|
+
* Type: ::PM_ALIAS_METHOD_NODE
|
1135
1152
|
*
|
1136
1153
|
* @extends pm_node_t
|
1137
1154
|
*/
|
@@ -1139,13 +1156,36 @@ typedef struct pm_alias_method_node {
|
|
1139
1156
|
/** The embedded base node. */
|
1140
1157
|
pm_node_t base;
|
1141
1158
|
|
1159
|
+
|
1142
1160
|
/**
|
1143
1161
|
* AliasMethodNode#new_name
|
1162
|
+
*
|
1163
|
+
* Represents the new name of the method that will be aliased.
|
1164
|
+
*
|
1165
|
+
* alias foo bar
|
1166
|
+
* ^^^
|
1167
|
+
*
|
1168
|
+
* alias :foo :bar
|
1169
|
+
* ^^^^
|
1170
|
+
*
|
1171
|
+
* alias :"#{foo}" :"#{bar}"
|
1172
|
+
* ^^^^^^^^^
|
1144
1173
|
*/
|
1145
1174
|
struct pm_node *new_name;
|
1146
1175
|
|
1147
1176
|
/**
|
1148
1177
|
* AliasMethodNode#old_name
|
1178
|
+
*
|
1179
|
+
* Represents the old name of the method that will be aliased.
|
1180
|
+
*
|
1181
|
+
* alias foo bar
|
1182
|
+
* ^^^
|
1183
|
+
*
|
1184
|
+
* alias :foo :bar
|
1185
|
+
* ^^^^
|
1186
|
+
*
|
1187
|
+
* alias :"#{foo}" :"#{bar}"
|
1188
|
+
* ^^^^^^^^^
|
1149
1189
|
*/
|
1150
1190
|
struct pm_node *old_name;
|
1151
1191
|
|
@@ -1158,7 +1198,12 @@ typedef struct pm_alias_method_node {
|
|
1158
1198
|
/**
|
1159
1199
|
* AlternationPatternNode
|
1160
1200
|
*
|
1161
|
-
*
|
1201
|
+
* Represents an alternation pattern in pattern matching.
|
1202
|
+
*
|
1203
|
+
* foo => bar | baz
|
1204
|
+
* ^^^^^^^^^
|
1205
|
+
*
|
1206
|
+
* Type: ::PM_ALTERNATION_PATTERN_NODE
|
1162
1207
|
*
|
1163
1208
|
* @extends pm_node_t
|
1164
1209
|
*/
|
@@ -1166,18 +1211,34 @@ typedef struct pm_alternation_pattern_node {
|
|
1166
1211
|
/** The embedded base node. */
|
1167
1212
|
pm_node_t base;
|
1168
1213
|
|
1214
|
+
|
1169
1215
|
/**
|
1170
1216
|
* AlternationPatternNode#left
|
1217
|
+
*
|
1218
|
+
* Represents the left side of the expression.
|
1219
|
+
*
|
1220
|
+
* foo => bar | baz
|
1221
|
+
* ^^^
|
1171
1222
|
*/
|
1172
1223
|
struct pm_node *left;
|
1173
1224
|
|
1174
1225
|
/**
|
1175
1226
|
* AlternationPatternNode#right
|
1227
|
+
*
|
1228
|
+
* Represents the right side of the expression.
|
1229
|
+
*
|
1230
|
+
* foo => bar | baz
|
1231
|
+
* ^^^
|
1176
1232
|
*/
|
1177
1233
|
struct pm_node *right;
|
1178
1234
|
|
1179
1235
|
/**
|
1180
1236
|
* AlternationPatternNode#operator_loc
|
1237
|
+
*
|
1238
|
+
* Represents the alternation operator location.
|
1239
|
+
*
|
1240
|
+
* foo => bar | baz
|
1241
|
+
* ^
|
1181
1242
|
*/
|
1182
1243
|
pm_location_t operator_loc;
|
1183
1244
|
} pm_alternation_pattern_node_t;
|
@@ -1185,7 +1246,12 @@ typedef struct pm_alternation_pattern_node {
|
|
1185
1246
|
/**
|
1186
1247
|
* AndNode
|
1187
1248
|
*
|
1188
|
-
*
|
1249
|
+
* Represents the use of the `&&` operator or the `and` keyword.
|
1250
|
+
*
|
1251
|
+
* left and right
|
1252
|
+
* ^^^^^^^^^^^^^^
|
1253
|
+
*
|
1254
|
+
* Type: ::PM_AND_NODE
|
1189
1255
|
*
|
1190
1256
|
* @extends pm_node_t
|
1191
1257
|
*/
|
@@ -1193,6 +1259,7 @@ typedef struct pm_and_node {
|
|
1193
1259
|
/** The embedded base node. */
|
1194
1260
|
pm_node_t base;
|
1195
1261
|
|
1262
|
+
|
1196
1263
|
/**
|
1197
1264
|
* AndNode#left
|
1198
1265
|
*
|
@@ -1209,7 +1276,7 @@ typedef struct pm_and_node {
|
|
1209
1276
|
/**
|
1210
1277
|
* AndNode#right
|
1211
1278
|
*
|
1212
|
-
* Represents the right side of the expression.
|
1279
|
+
* Represents the right side of the expression.
|
1213
1280
|
*
|
1214
1281
|
* left && right
|
1215
1282
|
* ^^^^^
|
@@ -1233,10 +1300,19 @@ typedef struct pm_and_node {
|
|
1233
1300
|
/**
|
1234
1301
|
* ArgumentsNode
|
1235
1302
|
*
|
1236
|
-
*
|
1237
|
-
*
|
1238
|
-
*
|
1239
|
-
*
|
1303
|
+
* Represents a set of arguments to a method or a keyword.
|
1304
|
+
*
|
1305
|
+
* return foo, bar, baz
|
1306
|
+
* ^^^^^^^^^^^^^
|
1307
|
+
*
|
1308
|
+
* Type: ::PM_ARGUMENTS_NODE
|
1309
|
+
|
1310
|
+
* Flags (#pm_arguments_node_flags):
|
1311
|
+
* * ::PM_ARGUMENTS_NODE_FLAGS_CONTAINS_FORWARDING
|
1312
|
+
* * ::PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORDS
|
1313
|
+
* * ::PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORD_SPLAT
|
1314
|
+
* * ::PM_ARGUMENTS_NODE_FLAGS_CONTAINS_SPLAT
|
1315
|
+
* * ::PM_ARGUMENTS_NODE_FLAGS_CONTAINS_MULTIPLE_SPLATS
|
1240
1316
|
*
|
1241
1317
|
* @extends pm_node_t
|
1242
1318
|
*/
|
@@ -1244,6 +1320,7 @@ typedef struct pm_arguments_node {
|
|
1244
1320
|
/** The embedded base node. */
|
1245
1321
|
pm_node_t base;
|
1246
1322
|
|
1323
|
+
|
1247
1324
|
/**
|
1248
1325
|
* ArgumentsNode#arguments
|
1249
1326
|
*/
|
@@ -1253,9 +1330,15 @@ typedef struct pm_arguments_node {
|
|
1253
1330
|
/**
|
1254
1331
|
* ArrayNode
|
1255
1332
|
*
|
1256
|
-
*
|
1257
|
-
*
|
1258
|
-
*
|
1333
|
+
* Represents an array literal. This can be a regular array using brackets or a special array using % like %w or %i.
|
1334
|
+
*
|
1335
|
+
* [1, 2, 3]
|
1336
|
+
* ^^^^^^^^^
|
1337
|
+
*
|
1338
|
+
* Type: ::PM_ARRAY_NODE
|
1339
|
+
|
1340
|
+
* Flags (#pm_array_node_flags):
|
1341
|
+
* * ::PM_ARRAY_NODE_FLAGS_CONTAINS_SPLAT
|
1259
1342
|
*
|
1260
1343
|
* @extends pm_node_t
|
1261
1344
|
*/
|
@@ -1263,6 +1346,7 @@ typedef struct pm_array_node {
|
|
1263
1346
|
/** The embedded base node. */
|
1264
1347
|
pm_node_t base;
|
1265
1348
|
|
1349
|
+
|
1266
1350
|
/**
|
1267
1351
|
* ArrayNode#elements
|
1268
1352
|
*
|
@@ -1298,7 +1382,24 @@ typedef struct pm_array_node {
|
|
1298
1382
|
/**
|
1299
1383
|
* ArrayPatternNode
|
1300
1384
|
*
|
1301
|
-
*
|
1385
|
+
* Represents an array pattern in pattern matching.
|
1386
|
+
*
|
1387
|
+
* foo in 1, 2
|
1388
|
+
* ^^^^^^^^^^^
|
1389
|
+
*
|
1390
|
+
* foo in [1, 2]
|
1391
|
+
* ^^^^^^^^^^^^^
|
1392
|
+
*
|
1393
|
+
* foo in *1
|
1394
|
+
* ^^^^^^^^^
|
1395
|
+
*
|
1396
|
+
* foo in Bar[]
|
1397
|
+
* ^^^^^^^^^^^^
|
1398
|
+
*
|
1399
|
+
* foo in Bar[1, 2, 3]
|
1400
|
+
* ^^^^^^^^^^^^^^^^^^^
|
1401
|
+
*
|
1402
|
+
* Type: ::PM_ARRAY_PATTERN_NODE
|
1302
1403
|
*
|
1303
1404
|
* @extends pm_node_t
|
1304
1405
|
*/
|
@@ -1306,6 +1407,7 @@ typedef struct pm_array_pattern_node {
|
|
1306
1407
|
/** The embedded base node. */
|
1307
1408
|
pm_node_t base;
|
1308
1409
|
|
1410
|
+
|
1309
1411
|
/**
|
1310
1412
|
* ArrayPatternNode#constant
|
1311
1413
|
*/
|
@@ -1340,7 +1442,12 @@ typedef struct pm_array_pattern_node {
|
|
1340
1442
|
/**
|
1341
1443
|
* AssocNode
|
1342
1444
|
*
|
1343
|
-
*
|
1445
|
+
* Represents a hash key/value pair.
|
1446
|
+
*
|
1447
|
+
* { a => b }
|
1448
|
+
* ^^^^^^
|
1449
|
+
*
|
1450
|
+
* Type: ::PM_ASSOC_NODE
|
1344
1451
|
*
|
1345
1452
|
* @extends pm_node_t
|
1346
1453
|
*/
|
@@ -1348,6 +1455,7 @@ typedef struct pm_assoc_node {
|
|
1348
1455
|
/** The embedded base node. */
|
1349
1456
|
pm_node_t base;
|
1350
1457
|
|
1458
|
+
|
1351
1459
|
/**
|
1352
1460
|
* AssocNode#key
|
1353
1461
|
*
|
@@ -1391,7 +1499,12 @@ typedef struct pm_assoc_node {
|
|
1391
1499
|
/**
|
1392
1500
|
* AssocSplatNode
|
1393
1501
|
*
|
1394
|
-
*
|
1502
|
+
* Represents a splat in a hash literal.
|
1503
|
+
*
|
1504
|
+
* { **foo }
|
1505
|
+
* ^^^^^
|
1506
|
+
*
|
1507
|
+
* Type: ::PM_ASSOC_SPLAT_NODE
|
1395
1508
|
*
|
1396
1509
|
* @extends pm_node_t
|
1397
1510
|
*/
|
@@ -1399,6 +1512,7 @@ typedef struct pm_assoc_splat_node {
|
|
1399
1512
|
/** The embedded base node. */
|
1400
1513
|
pm_node_t base;
|
1401
1514
|
|
1515
|
+
|
1402
1516
|
/**
|
1403
1517
|
* AssocSplatNode#value
|
1404
1518
|
*
|
@@ -1423,7 +1537,12 @@ typedef struct pm_assoc_splat_node {
|
|
1423
1537
|
/**
|
1424
1538
|
* BackReferenceReadNode
|
1425
1539
|
*
|
1426
|
-
*
|
1540
|
+
* Represents reading a reference to a field in the previous match.
|
1541
|
+
*
|
1542
|
+
* $'
|
1543
|
+
* ^^
|
1544
|
+
*
|
1545
|
+
* Type: ::PM_BACK_REFERENCE_READ_NODE
|
1427
1546
|
*
|
1428
1547
|
* @extends pm_node_t
|
1429
1548
|
*/
|
@@ -1431,6 +1550,7 @@ typedef struct pm_back_reference_read_node {
|
|
1431
1550
|
/** The embedded base node. */
|
1432
1551
|
pm_node_t base;
|
1433
1552
|
|
1553
|
+
|
1434
1554
|
/**
|
1435
1555
|
* BackReferenceReadNode#name
|
1436
1556
|
*
|
@@ -1446,7 +1566,14 @@ typedef struct pm_back_reference_read_node {
|
|
1446
1566
|
/**
|
1447
1567
|
* BeginNode
|
1448
1568
|
*
|
1449
|
-
*
|
1569
|
+
* Represents a begin statement.
|
1570
|
+
*
|
1571
|
+
* begin
|
1572
|
+
* foo
|
1573
|
+
* end
|
1574
|
+
* ^^^^^
|
1575
|
+
*
|
1576
|
+
* Type: ::PM_BEGIN_NODE
|
1450
1577
|
*
|
1451
1578
|
* @extends pm_node_t
|
1452
1579
|
*/
|
@@ -1454,6 +1581,7 @@ typedef struct pm_begin_node {
|
|
1454
1581
|
/** The embedded base node. */
|
1455
1582
|
pm_node_t base;
|
1456
1583
|
|
1584
|
+
|
1457
1585
|
/**
|
1458
1586
|
* BeginNode#begin_keyword_loc
|
1459
1587
|
*/
|
@@ -1488,7 +1616,12 @@ typedef struct pm_begin_node {
|
|
1488
1616
|
/**
|
1489
1617
|
* BlockArgumentNode
|
1490
1618
|
*
|
1491
|
-
*
|
1619
|
+
* Represents a block argument using `&`.
|
1620
|
+
*
|
1621
|
+
* bar(&args)
|
1622
|
+
* ^^^^^^^^^^
|
1623
|
+
*
|
1624
|
+
* Type: ::PM_BLOCK_ARGUMENT_NODE
|
1492
1625
|
*
|
1493
1626
|
* @extends pm_node_t
|
1494
1627
|
*/
|
@@ -1496,6 +1629,7 @@ typedef struct pm_block_argument_node {
|
|
1496
1629
|
/** The embedded base node. */
|
1497
1630
|
pm_node_t base;
|
1498
1631
|
|
1632
|
+
|
1499
1633
|
/**
|
1500
1634
|
* BlockArgumentNode#expression
|
1501
1635
|
*/
|
@@ -1510,9 +1644,15 @@ typedef struct pm_block_argument_node {
|
|
1510
1644
|
/**
|
1511
1645
|
* BlockLocalVariableNode
|
1512
1646
|
*
|
1513
|
-
*
|
1514
|
-
*
|
1515
|
-
*
|
1647
|
+
* Represents a block local variable.
|
1648
|
+
*
|
1649
|
+
* a { |; b| }
|
1650
|
+
* ^
|
1651
|
+
*
|
1652
|
+
* Type: ::PM_BLOCK_LOCAL_VARIABLE_NODE
|
1653
|
+
|
1654
|
+
* Flags (#pm_parameter_flags):
|
1655
|
+
* * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER
|
1516
1656
|
*
|
1517
1657
|
* @extends pm_node_t
|
1518
1658
|
*/
|
@@ -1520,6 +1660,7 @@ typedef struct pm_block_local_variable_node {
|
|
1520
1660
|
/** The embedded base node. */
|
1521
1661
|
pm_node_t base;
|
1522
1662
|
|
1663
|
+
|
1523
1664
|
/**
|
1524
1665
|
* BlockLocalVariableNode#name
|
1525
1666
|
*/
|
@@ -1529,7 +1670,12 @@ typedef struct pm_block_local_variable_node {
|
|
1529
1670
|
/**
|
1530
1671
|
* BlockNode
|
1531
1672
|
*
|
1532
|
-
*
|
1673
|
+
* Represents a block of ruby code.
|
1674
|
+
*
|
1675
|
+
* [1, 2, 3].each { |i| puts x }
|
1676
|
+
* ^^^^^^^^^^^^^^
|
1677
|
+
*
|
1678
|
+
* Type: ::PM_BLOCK_NODE
|
1533
1679
|
*
|
1534
1680
|
* @extends pm_node_t
|
1535
1681
|
*/
|
@@ -1537,6 +1683,7 @@ typedef struct pm_block_node {
|
|
1537
1683
|
/** The embedded base node. */
|
1538
1684
|
pm_node_t base;
|
1539
1685
|
|
1686
|
+
|
1540
1687
|
/**
|
1541
1688
|
* BlockNode#locals
|
1542
1689
|
*/
|
@@ -1566,9 +1713,16 @@ typedef struct pm_block_node {
|
|
1566
1713
|
/**
|
1567
1714
|
* BlockParameterNode
|
1568
1715
|
*
|
1569
|
-
*
|
1570
|
-
*
|
1571
|
-
*
|
1716
|
+
* Represents a block parameter of a method, block, or lambda definition.
|
1717
|
+
*
|
1718
|
+
* def a(&b)
|
1719
|
+
* ^^
|
1720
|
+
* end
|
1721
|
+
*
|
1722
|
+
* Type: ::PM_BLOCK_PARAMETER_NODE
|
1723
|
+
|
1724
|
+
* Flags (#pm_parameter_flags):
|
1725
|
+
* * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER
|
1572
1726
|
*
|
1573
1727
|
* @extends pm_node_t
|
1574
1728
|
*/
|
@@ -1576,6 +1730,7 @@ typedef struct pm_block_parameter_node {
|
|
1576
1730
|
/** The embedded base node. */
|
1577
1731
|
pm_node_t base;
|
1578
1732
|
|
1733
|
+
|
1579
1734
|
/**
|
1580
1735
|
* BlockParameterNode#name
|
1581
1736
|
*/
|
@@ -1595,7 +1750,16 @@ typedef struct pm_block_parameter_node {
|
|
1595
1750
|
/**
|
1596
1751
|
* BlockParametersNode
|
1597
1752
|
*
|
1598
|
-
*
|
1753
|
+
* Represents a block's parameters declaration.
|
1754
|
+
*
|
1755
|
+
* -> (a, b = 1; local) { }
|
1756
|
+
* ^^^^^^^^^^^^^^^^^
|
1757
|
+
*
|
1758
|
+
* foo do |a, b = 1; local|
|
1759
|
+
* ^^^^^^^^^^^^^^^^^
|
1760
|
+
* end
|
1761
|
+
*
|
1762
|
+
* Type: ::PM_BLOCK_PARAMETERS_NODE
|
1599
1763
|
*
|
1600
1764
|
* @extends pm_node_t
|
1601
1765
|
*/
|
@@ -1603,6 +1767,7 @@ typedef struct pm_block_parameters_node {
|
|
1603
1767
|
/** The embedded base node. */
|
1604
1768
|
pm_node_t base;
|
1605
1769
|
|
1770
|
+
|
1606
1771
|
/**
|
1607
1772
|
* BlockParametersNode#parameters
|
1608
1773
|
*/
|
@@ -1627,7 +1792,12 @@ typedef struct pm_block_parameters_node {
|
|
1627
1792
|
/**
|
1628
1793
|
* BreakNode
|
1629
1794
|
*
|
1630
|
-
*
|
1795
|
+
* Represents the use of the `break` keyword.
|
1796
|
+
*
|
1797
|
+
* break foo
|
1798
|
+
* ^^^^^^^^^
|
1799
|
+
*
|
1800
|
+
* Type: ::PM_BREAK_NODE
|
1631
1801
|
*
|
1632
1802
|
* @extends pm_node_t
|
1633
1803
|
*/
|
@@ -1635,6 +1805,7 @@ typedef struct pm_break_node {
|
|
1635
1805
|
/** The embedded base node. */
|
1636
1806
|
pm_node_t base;
|
1637
1807
|
|
1808
|
+
|
1638
1809
|
/**
|
1639
1810
|
* BreakNode#arguments
|
1640
1811
|
*
|
@@ -1659,12 +1830,18 @@ typedef struct pm_break_node {
|
|
1659
1830
|
/**
|
1660
1831
|
* CallAndWriteNode
|
1661
1832
|
*
|
1662
|
-
*
|
1663
|
-
*
|
1664
|
-
*
|
1665
|
-
*
|
1666
|
-
*
|
1667
|
-
*
|
1833
|
+
* Represents the use of the `&&=` operator on a call.
|
1834
|
+
*
|
1835
|
+
* foo.bar &&= value
|
1836
|
+
* ^^^^^^^^^^^^^^^^^
|
1837
|
+
*
|
1838
|
+
* Type: ::PM_CALL_AND_WRITE_NODE
|
1839
|
+
|
1840
|
+
* Flags (#pm_call_node_flags):
|
1841
|
+
* * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
|
1842
|
+
* * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
|
1843
|
+
* * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
|
1844
|
+
* * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
|
1668
1845
|
*
|
1669
1846
|
* @extends pm_node_t
|
1670
1847
|
*/
|
@@ -1672,6 +1849,7 @@ typedef struct pm_call_and_write_node {
|
|
1672
1849
|
/** The embedded base node. */
|
1673
1850
|
pm_node_t base;
|
1674
1851
|
|
1852
|
+
|
1675
1853
|
/**
|
1676
1854
|
* CallAndWriteNode#receiver
|
1677
1855
|
*/
|
@@ -1711,12 +1889,33 @@ typedef struct pm_call_and_write_node {
|
|
1711
1889
|
/**
|
1712
1890
|
* CallNode
|
1713
1891
|
*
|
1714
|
-
*
|
1715
|
-
*
|
1716
|
-
*
|
1717
|
-
*
|
1718
|
-
*
|
1719
|
-
*
|
1892
|
+
* Represents a method call, in all of the various forms that can take.
|
1893
|
+
*
|
1894
|
+
* foo
|
1895
|
+
* ^^^
|
1896
|
+
*
|
1897
|
+
* foo()
|
1898
|
+
* ^^^^^
|
1899
|
+
*
|
1900
|
+
* +foo
|
1901
|
+
* ^^^^
|
1902
|
+
*
|
1903
|
+
* foo + bar
|
1904
|
+
* ^^^^^^^^^
|
1905
|
+
*
|
1906
|
+
* foo.bar
|
1907
|
+
* ^^^^^^^
|
1908
|
+
*
|
1909
|
+
* foo&.bar
|
1910
|
+
* ^^^^^^^^
|
1911
|
+
*
|
1912
|
+
* Type: ::PM_CALL_NODE
|
1913
|
+
|
1914
|
+
* Flags (#pm_call_node_flags):
|
1915
|
+
* * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
|
1916
|
+
* * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
|
1917
|
+
* * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
|
1918
|
+
* * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
|
1720
1919
|
*
|
1721
1920
|
* @extends pm_node_t
|
1722
1921
|
*/
|
@@ -1724,6 +1923,7 @@ typedef struct pm_call_node {
|
|
1724
1923
|
/** The embedded base node. */
|
1725
1924
|
pm_node_t base;
|
1726
1925
|
|
1926
|
+
|
1727
1927
|
/**
|
1728
1928
|
* CallNode#receiver
|
1729
1929
|
*
|
@@ -1779,12 +1979,18 @@ typedef struct pm_call_node {
|
|
1779
1979
|
/**
|
1780
1980
|
* CallOperatorWriteNode
|
1781
1981
|
*
|
1782
|
-
*
|
1783
|
-
*
|
1784
|
-
*
|
1785
|
-
*
|
1786
|
-
*
|
1787
|
-
*
|
1982
|
+
* Represents the use of an assignment operator on a call.
|
1983
|
+
*
|
1984
|
+
* foo.bar += baz
|
1985
|
+
* ^^^^^^^^^^^^^^
|
1986
|
+
*
|
1987
|
+
* Type: ::PM_CALL_OPERATOR_WRITE_NODE
|
1988
|
+
|
1989
|
+
* Flags (#pm_call_node_flags):
|
1990
|
+
* * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
|
1991
|
+
* * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
|
1992
|
+
* * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
|
1993
|
+
* * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
|
1788
1994
|
*
|
1789
1995
|
* @extends pm_node_t
|
1790
1996
|
*/
|
@@ -1792,6 +1998,7 @@ typedef struct pm_call_operator_write_node {
|
|
1792
1998
|
/** The embedded base node. */
|
1793
1999
|
pm_node_t base;
|
1794
2000
|
|
2001
|
+
|
1795
2002
|
/**
|
1796
2003
|
* CallOperatorWriteNode#receiver
|
1797
2004
|
*/
|
@@ -1836,12 +2043,18 @@ typedef struct pm_call_operator_write_node {
|
|
1836
2043
|
/**
|
1837
2044
|
* CallOrWriteNode
|
1838
2045
|
*
|
1839
|
-
*
|
1840
|
-
*
|
1841
|
-
*
|
1842
|
-
*
|
1843
|
-
*
|
1844
|
-
*
|
2046
|
+
* Represents the use of the `||=` operator on a call.
|
2047
|
+
*
|
2048
|
+
* foo.bar ||= value
|
2049
|
+
* ^^^^^^^^^^^^^^^^^
|
2050
|
+
*
|
2051
|
+
* Type: ::PM_CALL_OR_WRITE_NODE
|
2052
|
+
|
2053
|
+
* Flags (#pm_call_node_flags):
|
2054
|
+
* * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
|
2055
|
+
* * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
|
2056
|
+
* * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
|
2057
|
+
* * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
|
1845
2058
|
*
|
1846
2059
|
* @extends pm_node_t
|
1847
2060
|
*/
|
@@ -1849,6 +2062,7 @@ typedef struct pm_call_or_write_node {
|
|
1849
2062
|
/** The embedded base node. */
|
1850
2063
|
pm_node_t base;
|
1851
2064
|
|
2065
|
+
|
1852
2066
|
/**
|
1853
2067
|
* CallOrWriteNode#receiver
|
1854
2068
|
*/
|
@@ -1888,12 +2102,26 @@ typedef struct pm_call_or_write_node {
|
|
1888
2102
|
/**
|
1889
2103
|
* CallTargetNode
|
1890
2104
|
*
|
1891
|
-
*
|
1892
|
-
*
|
1893
|
-
*
|
1894
|
-
*
|
1895
|
-
*
|
1896
|
-
*
|
2105
|
+
* Represents assigning to a method call.
|
2106
|
+
*
|
2107
|
+
* foo.bar, = 1
|
2108
|
+
* ^^^^^^^
|
2109
|
+
*
|
2110
|
+
* begin
|
2111
|
+
* rescue => foo.bar
|
2112
|
+
* ^^^^^^^
|
2113
|
+
* end
|
2114
|
+
*
|
2115
|
+
* for foo.bar in baz do end
|
2116
|
+
* ^^^^^^^
|
2117
|
+
*
|
2118
|
+
* Type: ::PM_CALL_TARGET_NODE
|
2119
|
+
|
2120
|
+
* Flags (#pm_call_node_flags):
|
2121
|
+
* * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
|
2122
|
+
* * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
|
2123
|
+
* * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
|
2124
|
+
* * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
|
1897
2125
|
*
|
1898
2126
|
* @extends pm_node_t
|
1899
2127
|
*/
|
@@ -1901,6 +2129,7 @@ typedef struct pm_call_target_node {
|
|
1901
2129
|
/** The embedded base node. */
|
1902
2130
|
pm_node_t base;
|
1903
2131
|
|
2132
|
+
|
1904
2133
|
/**
|
1905
2134
|
* CallTargetNode#receiver
|
1906
2135
|
*/
|
@@ -1925,7 +2154,12 @@ typedef struct pm_call_target_node {
|
|
1925
2154
|
/**
|
1926
2155
|
* CapturePatternNode
|
1927
2156
|
*
|
1928
|
-
*
|
2157
|
+
* Represents assigning to a local variable in pattern matching.
|
2158
|
+
*
|
2159
|
+
* foo => [bar => baz]
|
2160
|
+
* ^^^^^^^^^^^^
|
2161
|
+
*
|
2162
|
+
* Type: ::PM_CAPTURE_PATTERN_NODE
|
1929
2163
|
*
|
1930
2164
|
* @extends pm_node_t
|
1931
2165
|
*/
|
@@ -1933,6 +2167,7 @@ typedef struct pm_capture_pattern_node {
|
|
1933
2167
|
/** The embedded base node. */
|
1934
2168
|
pm_node_t base;
|
1935
2169
|
|
2170
|
+
|
1936
2171
|
/**
|
1937
2172
|
* CapturePatternNode#value
|
1938
2173
|
*/
|
@@ -1941,7 +2176,7 @@ typedef struct pm_capture_pattern_node {
|
|
1941
2176
|
/**
|
1942
2177
|
* CapturePatternNode#target
|
1943
2178
|
*/
|
1944
|
-
struct
|
2179
|
+
struct pm_local_variable_target_node *target;
|
1945
2180
|
|
1946
2181
|
/**
|
1947
2182
|
* CapturePatternNode#operator_loc
|
@@ -1952,7 +2187,14 @@ typedef struct pm_capture_pattern_node {
|
|
1952
2187
|
/**
|
1953
2188
|
* CaseMatchNode
|
1954
2189
|
*
|
1955
|
-
*
|
2190
|
+
* Represents the use of a case statement for pattern matching.
|
2191
|
+
*
|
2192
|
+
* case true
|
2193
|
+
* in false
|
2194
|
+
* end
|
2195
|
+
* ^^^^^^^^^
|
2196
|
+
*
|
2197
|
+
* Type: ::PM_CASE_MATCH_NODE
|
1956
2198
|
*
|
1957
2199
|
* @extends pm_node_t
|
1958
2200
|
*/
|
@@ -1960,6 +2202,7 @@ typedef struct pm_case_match_node {
|
|
1960
2202
|
/** The embedded base node. */
|
1961
2203
|
pm_node_t base;
|
1962
2204
|
|
2205
|
+
|
1963
2206
|
/**
|
1964
2207
|
* CaseMatchNode#predicate
|
1965
2208
|
*/
|
@@ -1971,9 +2214,9 @@ typedef struct pm_case_match_node {
|
|
1971
2214
|
struct pm_node_list conditions;
|
1972
2215
|
|
1973
2216
|
/**
|
1974
|
-
* CaseMatchNode#
|
2217
|
+
* CaseMatchNode#else_clause
|
1975
2218
|
*/
|
1976
|
-
struct pm_else_node *
|
2219
|
+
struct pm_else_node *else_clause;
|
1977
2220
|
|
1978
2221
|
/**
|
1979
2222
|
* CaseMatchNode#case_keyword_loc
|
@@ -1989,7 +2232,14 @@ typedef struct pm_case_match_node {
|
|
1989
2232
|
/**
|
1990
2233
|
* CaseNode
|
1991
2234
|
*
|
1992
|
-
*
|
2235
|
+
* Represents the use of a case statement.
|
2236
|
+
*
|
2237
|
+
* case true
|
2238
|
+
* when false
|
2239
|
+
* end
|
2240
|
+
* ^^^^^^^^^^
|
2241
|
+
*
|
2242
|
+
* Type: ::PM_CASE_NODE
|
1993
2243
|
*
|
1994
2244
|
* @extends pm_node_t
|
1995
2245
|
*/
|
@@ -1997,6 +2247,7 @@ typedef struct pm_case_node {
|
|
1997
2247
|
/** The embedded base node. */
|
1998
2248
|
pm_node_t base;
|
1999
2249
|
|
2250
|
+
|
2000
2251
|
/**
|
2001
2252
|
* CaseNode#predicate
|
2002
2253
|
*/
|
@@ -2008,9 +2259,9 @@ typedef struct pm_case_node {
|
|
2008
2259
|
struct pm_node_list conditions;
|
2009
2260
|
|
2010
2261
|
/**
|
2011
|
-
* CaseNode#
|
2262
|
+
* CaseNode#else_clause
|
2012
2263
|
*/
|
2013
|
-
struct pm_else_node *
|
2264
|
+
struct pm_else_node *else_clause;
|
2014
2265
|
|
2015
2266
|
/**
|
2016
2267
|
* CaseNode#case_keyword_loc
|
@@ -2026,7 +2277,12 @@ typedef struct pm_case_node {
|
|
2026
2277
|
/**
|
2027
2278
|
* ClassNode
|
2028
2279
|
*
|
2029
|
-
*
|
2280
|
+
* Represents a class declaration involving the `class` keyword.
|
2281
|
+
*
|
2282
|
+
* class Foo end
|
2283
|
+
* ^^^^^^^^^^^^^
|
2284
|
+
*
|
2285
|
+
* Type: ::PM_CLASS_NODE
|
2030
2286
|
*
|
2031
2287
|
* @extends pm_node_t
|
2032
2288
|
*/
|
@@ -2034,6 +2290,7 @@ typedef struct pm_class_node {
|
|
2034
2290
|
/** The embedded base node. */
|
2035
2291
|
pm_node_t base;
|
2036
2292
|
|
2293
|
+
|
2037
2294
|
/**
|
2038
2295
|
* ClassNode#locals
|
2039
2296
|
*/
|
@@ -2078,7 +2335,12 @@ typedef struct pm_class_node {
|
|
2078
2335
|
/**
|
2079
2336
|
* ClassVariableAndWriteNode
|
2080
2337
|
*
|
2081
|
-
*
|
2338
|
+
* Represents the use of the `&&=` operator for assignment to a class variable.
|
2339
|
+
*
|
2340
|
+
* @@target &&= value
|
2341
|
+
* ^^^^^^^^^^^^^^^^^^
|
2342
|
+
*
|
2343
|
+
* Type: ::PM_CLASS_VARIABLE_AND_WRITE_NODE
|
2082
2344
|
*
|
2083
2345
|
* @extends pm_node_t
|
2084
2346
|
*/
|
@@ -2086,6 +2348,7 @@ typedef struct pm_class_variable_and_write_node {
|
|
2086
2348
|
/** The embedded base node. */
|
2087
2349
|
pm_node_t base;
|
2088
2350
|
|
2351
|
+
|
2089
2352
|
/**
|
2090
2353
|
* ClassVariableAndWriteNode#name
|
2091
2354
|
*/
|
@@ -2110,7 +2373,12 @@ typedef struct pm_class_variable_and_write_node {
|
|
2110
2373
|
/**
|
2111
2374
|
* ClassVariableOperatorWriteNode
|
2112
2375
|
*
|
2113
|
-
*
|
2376
|
+
* Represents assigning to a class variable using an operator that isn't `=`.
|
2377
|
+
*
|
2378
|
+
* @@target += value
|
2379
|
+
* ^^^^^^^^^^^^^^^^^
|
2380
|
+
*
|
2381
|
+
* Type: ::PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE
|
2114
2382
|
*
|
2115
2383
|
* @extends pm_node_t
|
2116
2384
|
*/
|
@@ -2118,6 +2386,7 @@ typedef struct pm_class_variable_operator_write_node {
|
|
2118
2386
|
/** The embedded base node. */
|
2119
2387
|
pm_node_t base;
|
2120
2388
|
|
2389
|
+
|
2121
2390
|
/**
|
2122
2391
|
* ClassVariableOperatorWriteNode#name
|
2123
2392
|
*/
|
@@ -2147,7 +2416,12 @@ typedef struct pm_class_variable_operator_write_node {
|
|
2147
2416
|
/**
|
2148
2417
|
* ClassVariableOrWriteNode
|
2149
2418
|
*
|
2150
|
-
*
|
2419
|
+
* Represents the use of the `||=` operator for assignment to a class variable.
|
2420
|
+
*
|
2421
|
+
* @@target ||= value
|
2422
|
+
* ^^^^^^^^^^^^^^^^^^
|
2423
|
+
*
|
2424
|
+
* Type: ::PM_CLASS_VARIABLE_OR_WRITE_NODE
|
2151
2425
|
*
|
2152
2426
|
* @extends pm_node_t
|
2153
2427
|
*/
|
@@ -2155,6 +2429,7 @@ typedef struct pm_class_variable_or_write_node {
|
|
2155
2429
|
/** The embedded base node. */
|
2156
2430
|
pm_node_t base;
|
2157
2431
|
|
2432
|
+
|
2158
2433
|
/**
|
2159
2434
|
* ClassVariableOrWriteNode#name
|
2160
2435
|
*/
|
@@ -2179,7 +2454,12 @@ typedef struct pm_class_variable_or_write_node {
|
|
2179
2454
|
/**
|
2180
2455
|
* ClassVariableReadNode
|
2181
2456
|
*
|
2182
|
-
*
|
2457
|
+
* Represents referencing a class variable.
|
2458
|
+
*
|
2459
|
+
* @@foo
|
2460
|
+
* ^^^^^
|
2461
|
+
*
|
2462
|
+
* Type: ::PM_CLASS_VARIABLE_READ_NODE
|
2183
2463
|
*
|
2184
2464
|
* @extends pm_node_t
|
2185
2465
|
*/
|
@@ -2187,6 +2467,7 @@ typedef struct pm_class_variable_read_node {
|
|
2187
2467
|
/** The embedded base node. */
|
2188
2468
|
pm_node_t base;
|
2189
2469
|
|
2470
|
+
|
2190
2471
|
/**
|
2191
2472
|
* ClassVariableReadNode#name
|
2192
2473
|
*
|
@@ -2202,7 +2483,12 @@ typedef struct pm_class_variable_read_node {
|
|
2202
2483
|
/**
|
2203
2484
|
* ClassVariableTargetNode
|
2204
2485
|
*
|
2205
|
-
*
|
2486
|
+
* Represents writing to a class variable in a context that doesn't have an explicit value.
|
2487
|
+
*
|
2488
|
+
* @@foo, @@bar = baz
|
2489
|
+
* ^^^^^ ^^^^^
|
2490
|
+
*
|
2491
|
+
* Type: ::PM_CLASS_VARIABLE_TARGET_NODE
|
2206
2492
|
*
|
2207
2493
|
* @extends pm_node_t
|
2208
2494
|
*/
|
@@ -2210,6 +2496,7 @@ typedef struct pm_class_variable_target_node {
|
|
2210
2496
|
/** The embedded base node. */
|
2211
2497
|
pm_node_t base;
|
2212
2498
|
|
2499
|
+
|
2213
2500
|
/**
|
2214
2501
|
* ClassVariableTargetNode#name
|
2215
2502
|
*/
|
@@ -2219,7 +2506,12 @@ typedef struct pm_class_variable_target_node {
|
|
2219
2506
|
/**
|
2220
2507
|
* ClassVariableWriteNode
|
2221
2508
|
*
|
2222
|
-
*
|
2509
|
+
* Represents writing to a class variable.
|
2510
|
+
*
|
2511
|
+
* @@foo = 1
|
2512
|
+
* ^^^^^^^^^
|
2513
|
+
*
|
2514
|
+
* Type: ::PM_CLASS_VARIABLE_WRITE_NODE
|
2223
2515
|
*
|
2224
2516
|
* @extends pm_node_t
|
2225
2517
|
*/
|
@@ -2227,6 +2519,7 @@ typedef struct pm_class_variable_write_node {
|
|
2227
2519
|
/** The embedded base node. */
|
2228
2520
|
pm_node_t base;
|
2229
2521
|
|
2522
|
+
|
2230
2523
|
/**
|
2231
2524
|
* ClassVariableWriteNode#name
|
2232
2525
|
*
|
@@ -2275,7 +2568,12 @@ typedef struct pm_class_variable_write_node {
|
|
2275
2568
|
/**
|
2276
2569
|
* ConstantAndWriteNode
|
2277
2570
|
*
|
2278
|
-
*
|
2571
|
+
* Represents the use of the `&&=` operator for assignment to a constant.
|
2572
|
+
*
|
2573
|
+
* Target &&= value
|
2574
|
+
* ^^^^^^^^^^^^^^^^
|
2575
|
+
*
|
2576
|
+
* Type: ::PM_CONSTANT_AND_WRITE_NODE
|
2279
2577
|
*
|
2280
2578
|
* @extends pm_node_t
|
2281
2579
|
*/
|
@@ -2283,6 +2581,7 @@ typedef struct pm_constant_and_write_node {
|
|
2283
2581
|
/** The embedded base node. */
|
2284
2582
|
pm_node_t base;
|
2285
2583
|
|
2584
|
+
|
2286
2585
|
/**
|
2287
2586
|
* ConstantAndWriteNode#name
|
2288
2587
|
*/
|
@@ -2307,7 +2606,12 @@ typedef struct pm_constant_and_write_node {
|
|
2307
2606
|
/**
|
2308
2607
|
* ConstantOperatorWriteNode
|
2309
2608
|
*
|
2310
|
-
*
|
2609
|
+
* Represents assigning to a constant using an operator that isn't `=`.
|
2610
|
+
*
|
2611
|
+
* Target += value
|
2612
|
+
* ^^^^^^^^^^^^^^^
|
2613
|
+
*
|
2614
|
+
* Type: ::PM_CONSTANT_OPERATOR_WRITE_NODE
|
2311
2615
|
*
|
2312
2616
|
* @extends pm_node_t
|
2313
2617
|
*/
|
@@ -2315,6 +2619,7 @@ typedef struct pm_constant_operator_write_node {
|
|
2315
2619
|
/** The embedded base node. */
|
2316
2620
|
pm_node_t base;
|
2317
2621
|
|
2622
|
+
|
2318
2623
|
/**
|
2319
2624
|
* ConstantOperatorWriteNode#name
|
2320
2625
|
*/
|
@@ -2344,7 +2649,12 @@ typedef struct pm_constant_operator_write_node {
|
|
2344
2649
|
/**
|
2345
2650
|
* ConstantOrWriteNode
|
2346
2651
|
*
|
2347
|
-
*
|
2652
|
+
* Represents the use of the `||=` operator for assignment to a constant.
|
2653
|
+
*
|
2654
|
+
* Target ||= value
|
2655
|
+
* ^^^^^^^^^^^^^^^^
|
2656
|
+
*
|
2657
|
+
* Type: ::PM_CONSTANT_OR_WRITE_NODE
|
2348
2658
|
*
|
2349
2659
|
* @extends pm_node_t
|
2350
2660
|
*/
|
@@ -2352,6 +2662,7 @@ typedef struct pm_constant_or_write_node {
|
|
2352
2662
|
/** The embedded base node. */
|
2353
2663
|
pm_node_t base;
|
2354
2664
|
|
2665
|
+
|
2355
2666
|
/**
|
2356
2667
|
* ConstantOrWriteNode#name
|
2357
2668
|
*/
|
@@ -2376,7 +2687,12 @@ typedef struct pm_constant_or_write_node {
|
|
2376
2687
|
/**
|
2377
2688
|
* ConstantPathAndWriteNode
|
2378
2689
|
*
|
2379
|
-
*
|
2690
|
+
* Represents the use of the `&&=` operator for assignment to a constant path.
|
2691
|
+
*
|
2692
|
+
* Parent::Child &&= value
|
2693
|
+
* ^^^^^^^^^^^^^^^^^^^^^^^
|
2694
|
+
*
|
2695
|
+
* Type: ::PM_CONSTANT_PATH_AND_WRITE_NODE
|
2380
2696
|
*
|
2381
2697
|
* @extends pm_node_t
|
2382
2698
|
*/
|
@@ -2384,6 +2700,7 @@ typedef struct pm_constant_path_and_write_node {
|
|
2384
2700
|
/** The embedded base node. */
|
2385
2701
|
pm_node_t base;
|
2386
2702
|
|
2703
|
+
|
2387
2704
|
/**
|
2388
2705
|
* ConstantPathAndWriteNode#target
|
2389
2706
|
*/
|
@@ -2403,7 +2720,12 @@ typedef struct pm_constant_path_and_write_node {
|
|
2403
2720
|
/**
|
2404
2721
|
* ConstantPathNode
|
2405
2722
|
*
|
2406
|
-
*
|
2723
|
+
* Represents accessing a constant through a path of `::` operators.
|
2724
|
+
*
|
2725
|
+
* Foo::Bar
|
2726
|
+
* ^^^^^^^^
|
2727
|
+
*
|
2728
|
+
* Type: ::PM_CONSTANT_PATH_NODE
|
2407
2729
|
*
|
2408
2730
|
* @extends pm_node_t
|
2409
2731
|
*/
|
@@ -2411,6 +2733,7 @@ typedef struct pm_constant_path_node {
|
|
2411
2733
|
/** The embedded base node. */
|
2412
2734
|
pm_node_t base;
|
2413
2735
|
|
2736
|
+
|
2414
2737
|
/**
|
2415
2738
|
* ConstantPathNode#parent
|
2416
2739
|
*
|
@@ -2464,7 +2787,12 @@ typedef struct pm_constant_path_node {
|
|
2464
2787
|
/**
|
2465
2788
|
* ConstantPathOperatorWriteNode
|
2466
2789
|
*
|
2467
|
-
*
|
2790
|
+
* Represents assigning to a constant path using an operator that isn't `=`.
|
2791
|
+
*
|
2792
|
+
* Parent::Child += value
|
2793
|
+
* ^^^^^^^^^^^^^^^^^^^^^^
|
2794
|
+
*
|
2795
|
+
* Type: ::PM_CONSTANT_PATH_OPERATOR_WRITE_NODE
|
2468
2796
|
*
|
2469
2797
|
* @extends pm_node_t
|
2470
2798
|
*/
|
@@ -2472,6 +2800,7 @@ typedef struct pm_constant_path_operator_write_node {
|
|
2472
2800
|
/** The embedded base node. */
|
2473
2801
|
pm_node_t base;
|
2474
2802
|
|
2803
|
+
|
2475
2804
|
/**
|
2476
2805
|
* ConstantPathOperatorWriteNode#target
|
2477
2806
|
*/
|
@@ -2496,7 +2825,12 @@ typedef struct pm_constant_path_operator_write_node {
|
|
2496
2825
|
/**
|
2497
2826
|
* ConstantPathOrWriteNode
|
2498
2827
|
*
|
2499
|
-
*
|
2828
|
+
* Represents the use of the `||=` operator for assignment to a constant path.
|
2829
|
+
*
|
2830
|
+
* Parent::Child ||= value
|
2831
|
+
* ^^^^^^^^^^^^^^^^^^^^^^^
|
2832
|
+
*
|
2833
|
+
* Type: ::PM_CONSTANT_PATH_OR_WRITE_NODE
|
2500
2834
|
*
|
2501
2835
|
* @extends pm_node_t
|
2502
2836
|
*/
|
@@ -2504,6 +2838,7 @@ typedef struct pm_constant_path_or_write_node {
|
|
2504
2838
|
/** The embedded base node. */
|
2505
2839
|
pm_node_t base;
|
2506
2840
|
|
2841
|
+
|
2507
2842
|
/**
|
2508
2843
|
* ConstantPathOrWriteNode#target
|
2509
2844
|
*/
|
@@ -2523,7 +2858,12 @@ typedef struct pm_constant_path_or_write_node {
|
|
2523
2858
|
/**
|
2524
2859
|
* ConstantPathTargetNode
|
2525
2860
|
*
|
2526
|
-
*
|
2861
|
+
* Represents writing to a constant path in a context that doesn't have an explicit value.
|
2862
|
+
*
|
2863
|
+
* Foo::Foo, Bar::Bar = baz
|
2864
|
+
* ^^^^^^^^ ^^^^^^^^
|
2865
|
+
*
|
2866
|
+
* Type: ::PM_CONSTANT_PATH_TARGET_NODE
|
2527
2867
|
*
|
2528
2868
|
* @extends pm_node_t
|
2529
2869
|
*/
|
@@ -2531,6 +2871,7 @@ typedef struct pm_constant_path_target_node {
|
|
2531
2871
|
/** The embedded base node. */
|
2532
2872
|
pm_node_t base;
|
2533
2873
|
|
2874
|
+
|
2534
2875
|
/**
|
2535
2876
|
* ConstantPathTargetNode#parent
|
2536
2877
|
*/
|
@@ -2555,7 +2896,18 @@ typedef struct pm_constant_path_target_node {
|
|
2555
2896
|
/**
|
2556
2897
|
* ConstantPathWriteNode
|
2557
2898
|
*
|
2558
|
-
*
|
2899
|
+
* Represents writing to a constant path.
|
2900
|
+
*
|
2901
|
+
* ::Foo = 1
|
2902
|
+
* ^^^^^^^^^
|
2903
|
+
*
|
2904
|
+
* Foo::Bar = 1
|
2905
|
+
* ^^^^^^^^^^^^
|
2906
|
+
*
|
2907
|
+
* ::Foo::Bar = 1
|
2908
|
+
* ^^^^^^^^^^^^^^
|
2909
|
+
*
|
2910
|
+
* Type: ::PM_CONSTANT_PATH_WRITE_NODE
|
2559
2911
|
*
|
2560
2912
|
* @extends pm_node_t
|
2561
2913
|
*/
|
@@ -2563,6 +2915,7 @@ typedef struct pm_constant_path_write_node {
|
|
2563
2915
|
/** The embedded base node. */
|
2564
2916
|
pm_node_t base;
|
2565
2917
|
|
2918
|
+
|
2566
2919
|
/**
|
2567
2920
|
* ConstantPathWriteNode#target
|
2568
2921
|
*
|
@@ -2600,7 +2953,12 @@ typedef struct pm_constant_path_write_node {
|
|
2600
2953
|
/**
|
2601
2954
|
* ConstantReadNode
|
2602
2955
|
*
|
2603
|
-
*
|
2956
|
+
* Represents referencing a constant.
|
2957
|
+
*
|
2958
|
+
* Foo
|
2959
|
+
* ^^^
|
2960
|
+
*
|
2961
|
+
* Type: ::PM_CONSTANT_READ_NODE
|
2604
2962
|
*
|
2605
2963
|
* @extends pm_node_t
|
2606
2964
|
*/
|
@@ -2608,6 +2966,7 @@ typedef struct pm_constant_read_node {
|
|
2608
2966
|
/** The embedded base node. */
|
2609
2967
|
pm_node_t base;
|
2610
2968
|
|
2969
|
+
|
2611
2970
|
/**
|
2612
2971
|
* ConstantReadNode#name
|
2613
2972
|
*
|
@@ -2623,7 +2982,12 @@ typedef struct pm_constant_read_node {
|
|
2623
2982
|
/**
|
2624
2983
|
* ConstantTargetNode
|
2625
2984
|
*
|
2626
|
-
*
|
2985
|
+
* Represents writing to a constant in a context that doesn't have an explicit value.
|
2986
|
+
*
|
2987
|
+
* Foo, Bar = baz
|
2988
|
+
* ^^^ ^^^
|
2989
|
+
*
|
2990
|
+
* Type: ::PM_CONSTANT_TARGET_NODE
|
2627
2991
|
*
|
2628
2992
|
* @extends pm_node_t
|
2629
2993
|
*/
|
@@ -2631,6 +2995,7 @@ typedef struct pm_constant_target_node {
|
|
2631
2995
|
/** The embedded base node. */
|
2632
2996
|
pm_node_t base;
|
2633
2997
|
|
2998
|
+
|
2634
2999
|
/**
|
2635
3000
|
* ConstantTargetNode#name
|
2636
3001
|
*/
|
@@ -2640,7 +3005,12 @@ typedef struct pm_constant_target_node {
|
|
2640
3005
|
/**
|
2641
3006
|
* ConstantWriteNode
|
2642
3007
|
*
|
2643
|
-
*
|
3008
|
+
* Represents writing to a constant.
|
3009
|
+
*
|
3010
|
+
* Foo = 1
|
3011
|
+
* ^^^^^^^
|
3012
|
+
*
|
3013
|
+
* Type: ::PM_CONSTANT_WRITE_NODE
|
2644
3014
|
*
|
2645
3015
|
* @extends pm_node_t
|
2646
3016
|
*/
|
@@ -2648,6 +3018,7 @@ typedef struct pm_constant_write_node {
|
|
2648
3018
|
/** The embedded base node. */
|
2649
3019
|
pm_node_t base;
|
2650
3020
|
|
3021
|
+
|
2651
3022
|
/**
|
2652
3023
|
* ConstantWriteNode#name
|
2653
3024
|
*
|
@@ -2696,7 +3067,13 @@ typedef struct pm_constant_write_node {
|
|
2696
3067
|
/**
|
2697
3068
|
* DefNode
|
2698
3069
|
*
|
2699
|
-
*
|
3070
|
+
* Represents a method definition.
|
3071
|
+
*
|
3072
|
+
* def method
|
3073
|
+
* end
|
3074
|
+
* ^^^^^^^^^^
|
3075
|
+
*
|
3076
|
+
* Type: ::PM_DEF_NODE
|
2700
3077
|
*
|
2701
3078
|
* @extends pm_node_t
|
2702
3079
|
*/
|
@@ -2704,6 +3081,7 @@ typedef struct pm_def_node {
|
|
2704
3081
|
/** The embedded base node. */
|
2705
3082
|
pm_node_t base;
|
2706
3083
|
|
3084
|
+
|
2707
3085
|
/**
|
2708
3086
|
* DefNode#name
|
2709
3087
|
*/
|
@@ -2768,7 +3146,12 @@ typedef struct pm_def_node {
|
|
2768
3146
|
/**
|
2769
3147
|
* DefinedNode
|
2770
3148
|
*
|
2771
|
-
*
|
3149
|
+
* Represents the use of the `defined?` keyword.
|
3150
|
+
*
|
3151
|
+
* defined?(a)
|
3152
|
+
* ^^^^^^^^^^^
|
3153
|
+
*
|
3154
|
+
* Type: ::PM_DEFINED_NODE
|
2772
3155
|
*
|
2773
3156
|
* @extends pm_node_t
|
2774
3157
|
*/
|
@@ -2776,6 +3159,7 @@ typedef struct pm_defined_node {
|
|
2776
3159
|
/** The embedded base node. */
|
2777
3160
|
pm_node_t base;
|
2778
3161
|
|
3162
|
+
|
2779
3163
|
/**
|
2780
3164
|
* DefinedNode#lparen_loc
|
2781
3165
|
*/
|
@@ -2800,7 +3184,12 @@ typedef struct pm_defined_node {
|
|
2800
3184
|
/**
|
2801
3185
|
* ElseNode
|
2802
3186
|
*
|
2803
|
-
*
|
3187
|
+
* Represents an `else` clause in a `case`, `if`, or `unless` statement.
|
3188
|
+
*
|
3189
|
+
* if a then b else c end
|
3190
|
+
* ^^^^^^^^^^
|
3191
|
+
*
|
3192
|
+
* Type: ::PM_ELSE_NODE
|
2804
3193
|
*
|
2805
3194
|
* @extends pm_node_t
|
2806
3195
|
*/
|
@@ -2808,6 +3197,7 @@ typedef struct pm_else_node {
|
|
2808
3197
|
/** The embedded base node. */
|
2809
3198
|
pm_node_t base;
|
2810
3199
|
|
3200
|
+
|
2811
3201
|
/**
|
2812
3202
|
* ElseNode#else_keyword_loc
|
2813
3203
|
*/
|
@@ -2827,7 +3217,12 @@ typedef struct pm_else_node {
|
|
2827
3217
|
/**
|
2828
3218
|
* EmbeddedStatementsNode
|
2829
3219
|
*
|
2830
|
-
*
|
3220
|
+
* Represents an interpolated set of statements.
|
3221
|
+
*
|
3222
|
+
* "foo #{bar}"
|
3223
|
+
* ^^^^^^
|
3224
|
+
*
|
3225
|
+
* Type: ::PM_EMBEDDED_STATEMENTS_NODE
|
2831
3226
|
*
|
2832
3227
|
* @extends pm_node_t
|
2833
3228
|
*/
|
@@ -2835,6 +3230,7 @@ typedef struct pm_embedded_statements_node {
|
|
2835
3230
|
/** The embedded base node. */
|
2836
3231
|
pm_node_t base;
|
2837
3232
|
|
3233
|
+
|
2838
3234
|
/**
|
2839
3235
|
* EmbeddedStatementsNode#opening_loc
|
2840
3236
|
*/
|
@@ -2854,7 +3250,12 @@ typedef struct pm_embedded_statements_node {
|
|
2854
3250
|
/**
|
2855
3251
|
* EmbeddedVariableNode
|
2856
3252
|
*
|
2857
|
-
*
|
3253
|
+
* Represents an interpolated variable.
|
3254
|
+
*
|
3255
|
+
* "foo #@bar"
|
3256
|
+
* ^^^^^
|
3257
|
+
*
|
3258
|
+
* Type: ::PM_EMBEDDED_VARIABLE_NODE
|
2858
3259
|
*
|
2859
3260
|
* @extends pm_node_t
|
2860
3261
|
*/
|
@@ -2862,6 +3263,7 @@ typedef struct pm_embedded_variable_node {
|
|
2862
3263
|
/** The embedded base node. */
|
2863
3264
|
pm_node_t base;
|
2864
3265
|
|
3266
|
+
|
2865
3267
|
/**
|
2866
3268
|
* EmbeddedVariableNode#operator_loc
|
2867
3269
|
*/
|
@@ -2876,7 +3278,16 @@ typedef struct pm_embedded_variable_node {
|
|
2876
3278
|
/**
|
2877
3279
|
* EnsureNode
|
2878
3280
|
*
|
2879
|
-
*
|
3281
|
+
* Represents an `ensure` clause in a `begin` statement.
|
3282
|
+
*
|
3283
|
+
* begin
|
3284
|
+
* foo
|
3285
|
+
* ensure
|
3286
|
+
* ^^^^^^
|
3287
|
+
* bar
|
3288
|
+
* end
|
3289
|
+
*
|
3290
|
+
* Type: ::PM_ENSURE_NODE
|
2880
3291
|
*
|
2881
3292
|
* @extends pm_node_t
|
2882
3293
|
*/
|
@@ -2884,6 +3295,7 @@ typedef struct pm_ensure_node {
|
|
2884
3295
|
/** The embedded base node. */
|
2885
3296
|
pm_node_t base;
|
2886
3297
|
|
3298
|
+
|
2887
3299
|
/**
|
2888
3300
|
* EnsureNode#ensure_keyword_loc
|
2889
3301
|
*/
|
@@ -2903,19 +3315,36 @@ typedef struct pm_ensure_node {
|
|
2903
3315
|
/**
|
2904
3316
|
* FalseNode
|
2905
3317
|
*
|
2906
|
-
*
|
3318
|
+
* Represents the use of the literal `false` keyword.
|
3319
|
+
*
|
3320
|
+
* false
|
3321
|
+
* ^^^^^
|
3322
|
+
*
|
3323
|
+
* Type: ::PM_FALSE_NODE
|
2907
3324
|
*
|
2908
3325
|
* @extends pm_node_t
|
2909
3326
|
*/
|
2910
3327
|
typedef struct pm_false_node {
|
2911
3328
|
/** The embedded base node. */
|
2912
3329
|
pm_node_t base;
|
3330
|
+
|
2913
3331
|
} pm_false_node_t;
|
2914
3332
|
|
2915
3333
|
/**
|
2916
3334
|
* FindPatternNode
|
2917
3335
|
*
|
2918
|
-
*
|
3336
|
+
* Represents a find pattern in pattern matching.
|
3337
|
+
*
|
3338
|
+
* foo in *bar, baz, *qux
|
3339
|
+
* ^^^^^^^^^^^^^^^
|
3340
|
+
*
|
3341
|
+
* foo in [*bar, baz, *qux]
|
3342
|
+
* ^^^^^^^^^^^^^^^^^
|
3343
|
+
*
|
3344
|
+
* foo in Foo(*bar, baz, *qux)
|
3345
|
+
* ^^^^^^^^^^^^^^^^^^^^
|
3346
|
+
*
|
3347
|
+
* Type: ::PM_FIND_PATTERN_NODE
|
2919
3348
|
*
|
2920
3349
|
* @extends pm_node_t
|
2921
3350
|
*/
|
@@ -2923,6 +3352,7 @@ typedef struct pm_find_pattern_node {
|
|
2923
3352
|
/** The embedded base node. */
|
2924
3353
|
pm_node_t base;
|
2925
3354
|
|
3355
|
+
|
2926
3356
|
/**
|
2927
3357
|
* FindPatternNode#constant
|
2928
3358
|
*/
|
@@ -2931,7 +3361,7 @@ typedef struct pm_find_pattern_node {
|
|
2931
3361
|
/**
|
2932
3362
|
* FindPatternNode#left
|
2933
3363
|
*/
|
2934
|
-
struct
|
3364
|
+
struct pm_splat_node *left;
|
2935
3365
|
|
2936
3366
|
/**
|
2937
3367
|
* FindPatternNode#requireds
|
@@ -2957,9 +3387,15 @@ typedef struct pm_find_pattern_node {
|
|
2957
3387
|
/**
|
2958
3388
|
* FlipFlopNode
|
2959
3389
|
*
|
2960
|
-
*
|
2961
|
-
*
|
2962
|
-
*
|
3390
|
+
* Represents the use of the `..` or `...` operators to create flip flops.
|
3391
|
+
*
|
3392
|
+
* baz if foo .. bar
|
3393
|
+
* ^^^^^^^^^^
|
3394
|
+
*
|
3395
|
+
* Type: ::PM_FLIP_FLOP_NODE
|
3396
|
+
|
3397
|
+
* Flags (#pm_range_flags):
|
3398
|
+
* * ::PM_RANGE_FLAGS_EXCLUDE_END
|
2963
3399
|
*
|
2964
3400
|
* @extends pm_node_t
|
2965
3401
|
*/
|
@@ -2967,6 +3403,7 @@ typedef struct pm_flip_flop_node {
|
|
2967
3403
|
/** The embedded base node. */
|
2968
3404
|
pm_node_t base;
|
2969
3405
|
|
3406
|
+
|
2970
3407
|
/**
|
2971
3408
|
* FlipFlopNode#left
|
2972
3409
|
*/
|
@@ -2986,7 +3423,12 @@ typedef struct pm_flip_flop_node {
|
|
2986
3423
|
/**
|
2987
3424
|
* FloatNode
|
2988
3425
|
*
|
2989
|
-
*
|
3426
|
+
* Represents a floating point number literal.
|
3427
|
+
*
|
3428
|
+
* 1.0
|
3429
|
+
* ^^^
|
3430
|
+
*
|
3431
|
+
* Type: ::PM_FLOAT_NODE
|
2990
3432
|
*
|
2991
3433
|
* @extends pm_node_t
|
2992
3434
|
*/
|
@@ -2994,6 +3436,7 @@ typedef struct pm_float_node {
|
|
2994
3436
|
/** The embedded base node. */
|
2995
3437
|
pm_node_t base;
|
2996
3438
|
|
3439
|
+
|
2997
3440
|
/**
|
2998
3441
|
* FloatNode#value
|
2999
3442
|
*
|
@@ -3005,7 +3448,12 @@ typedef struct pm_float_node {
|
|
3005
3448
|
/**
|
3006
3449
|
* ForNode
|
3007
3450
|
*
|
3008
|
-
*
|
3451
|
+
* Represents the use of the `for` keyword.
|
3452
|
+
*
|
3453
|
+
* for i in a end
|
3454
|
+
* ^^^^^^^^^^^^^^
|
3455
|
+
*
|
3456
|
+
* Type: ::PM_FOR_NODE
|
3009
3457
|
*
|
3010
3458
|
* @extends pm_node_t
|
3011
3459
|
*/
|
@@ -3013,38 +3461,76 @@ typedef struct pm_for_node {
|
|
3013
3461
|
/** The embedded base node. */
|
3014
3462
|
pm_node_t base;
|
3015
3463
|
|
3464
|
+
|
3016
3465
|
/**
|
3017
3466
|
* ForNode#index
|
3467
|
+
*
|
3468
|
+
* The index expression for `for` loops.
|
3469
|
+
*
|
3470
|
+
* for i in a end
|
3471
|
+
* ^
|
3018
3472
|
*/
|
3019
3473
|
struct pm_node *index;
|
3020
3474
|
|
3021
3475
|
/**
|
3022
3476
|
* ForNode#collection
|
3477
|
+
*
|
3478
|
+
* The collection to iterate over.
|
3479
|
+
*
|
3480
|
+
* for i in a end
|
3481
|
+
* ^
|
3023
3482
|
*/
|
3024
3483
|
struct pm_node *collection;
|
3025
3484
|
|
3026
3485
|
/**
|
3027
3486
|
* ForNode#statements
|
3487
|
+
*
|
3488
|
+
* Represents the body of statements to execute for each iteration of the loop.
|
3489
|
+
*
|
3490
|
+
* for i in a
|
3491
|
+
* foo(i)
|
3492
|
+
* ^^^^^^
|
3493
|
+
* end
|
3028
3494
|
*/
|
3029
3495
|
struct pm_statements_node *statements;
|
3030
3496
|
|
3031
3497
|
/**
|
3032
3498
|
* ForNode#for_keyword_loc
|
3499
|
+
*
|
3500
|
+
* The location of the `for` keyword.
|
3501
|
+
*
|
3502
|
+
* for i in a end
|
3503
|
+
* ^^^
|
3033
3504
|
*/
|
3034
3505
|
pm_location_t for_keyword_loc;
|
3035
3506
|
|
3036
3507
|
/**
|
3037
3508
|
* ForNode#in_keyword_loc
|
3509
|
+
*
|
3510
|
+
* The location of the `in` keyword.
|
3511
|
+
*
|
3512
|
+
* for i in a end
|
3513
|
+
* ^^
|
3038
3514
|
*/
|
3039
3515
|
pm_location_t in_keyword_loc;
|
3040
3516
|
|
3041
3517
|
/**
|
3042
3518
|
* ForNode#do_keyword_loc
|
3519
|
+
*
|
3520
|
+
* The location of the `do` keyword, if present.
|
3521
|
+
*
|
3522
|
+
* for i in a do end
|
3523
|
+
* ^^
|
3043
3524
|
*/
|
3044
3525
|
pm_location_t do_keyword_loc;
|
3045
3526
|
|
3046
3527
|
/**
|
3047
3528
|
* ForNode#end_keyword_loc
|
3529
|
+
*
|
3530
|
+
* The location of the `end` keyword.
|
3531
|
+
*
|
3532
|
+
* for i in a end
|
3533
|
+
* ^^^
|
3048
3534
|
*/
|
3049
3535
|
pm_location_t end_keyword_loc;
|
3050
3536
|
} pm_for_node_t;
|
@@ -3052,31 +3538,51 @@ typedef struct pm_for_node {
|
|
3052
3538
|
/**
|
3053
3539
|
* ForwardingArgumentsNode
|
3054
3540
|
*
|
3055
|
-
*
|
3541
|
+
* Represents forwarding all arguments to this method to another method.
|
3542
|
+
*
|
3543
|
+
* def foo(...)
|
3544
|
+
* bar(...)
|
3545
|
+
* ^^^
|
3546
|
+
* end
|
3547
|
+
*
|
3548
|
+
* Type: ::PM_FORWARDING_ARGUMENTS_NODE
|
3056
3549
|
*
|
3057
3550
|
* @extends pm_node_t
|
3058
3551
|
*/
|
3059
3552
|
typedef struct pm_forwarding_arguments_node {
|
3060
3553
|
/** The embedded base node. */
|
3061
3554
|
pm_node_t base;
|
3555
|
+
|
3062
3556
|
} pm_forwarding_arguments_node_t;
|
3063
3557
|
|
3064
3558
|
/**
|
3065
3559
|
* ForwardingParameterNode
|
3066
3560
|
*
|
3067
|
-
*
|
3561
|
+
* Represents the use of the forwarding parameter in a method, block, or lambda declaration.
|
3562
|
+
*
|
3563
|
+
* def foo(...)
|
3564
|
+
* ^^^
|
3565
|
+
* end
|
3566
|
+
*
|
3567
|
+
* Type: ::PM_FORWARDING_PARAMETER_NODE
|
3068
3568
|
*
|
3069
3569
|
* @extends pm_node_t
|
3070
3570
|
*/
|
3071
3571
|
typedef struct pm_forwarding_parameter_node {
|
3072
3572
|
/** The embedded base node. */
|
3073
3573
|
pm_node_t base;
|
3574
|
+
|
3074
3575
|
} pm_forwarding_parameter_node_t;
|
3075
3576
|
|
3076
3577
|
/**
|
3077
3578
|
* ForwardingSuperNode
|
3078
3579
|
*
|
3079
|
-
*
|
3580
|
+
* Represents the use of the `super` keyword without parentheses or arguments.
|
3581
|
+
*
|
3582
|
+
* super
|
3583
|
+
* ^^^^^
|
3584
|
+
*
|
3585
|
+
* Type: ::PM_FORWARDING_SUPER_NODE
|
3080
3586
|
*
|
3081
3587
|
* @extends pm_node_t
|
3082
3588
|
*/
|
@@ -3084,6 +3590,7 @@ typedef struct pm_forwarding_super_node {
|
|
3084
3590
|
/** The embedded base node. */
|
3085
3591
|
pm_node_t base;
|
3086
3592
|
|
3593
|
+
|
3087
3594
|
/**
|
3088
3595
|
* ForwardingSuperNode#block
|
3089
3596
|
*/
|
@@ -3093,7 +3600,12 @@ typedef struct pm_forwarding_super_node {
|
|
3093
3600
|
/**
|
3094
3601
|
* GlobalVariableAndWriteNode
|
3095
3602
|
*
|
3096
|
-
*
|
3603
|
+
* Represents the use of the `&&=` operator for assignment to a global variable.
|
3604
|
+
*
|
3605
|
+
* $target &&= value
|
3606
|
+
* ^^^^^^^^^^^^^^^^^
|
3607
|
+
*
|
3608
|
+
* Type: ::PM_GLOBAL_VARIABLE_AND_WRITE_NODE
|
3097
3609
|
*
|
3098
3610
|
* @extends pm_node_t
|
3099
3611
|
*/
|
@@ -3101,6 +3613,7 @@ typedef struct pm_global_variable_and_write_node {
|
|
3101
3613
|
/** The embedded base node. */
|
3102
3614
|
pm_node_t base;
|
3103
3615
|
|
3616
|
+
|
3104
3617
|
/**
|
3105
3618
|
* GlobalVariableAndWriteNode#name
|
3106
3619
|
*/
|
@@ -3125,7 +3638,12 @@ typedef struct pm_global_variable_and_write_node {
|
|
3125
3638
|
/**
|
3126
3639
|
* GlobalVariableOperatorWriteNode
|
3127
3640
|
*
|
3128
|
-
*
|
3641
|
+
* Represents assigning to a global variable using an operator that isn't `=`.
|
3642
|
+
*
|
3643
|
+
* $target += value
|
3644
|
+
* ^^^^^^^^^^^^^^^^
|
3645
|
+
*
|
3646
|
+
* Type: ::PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE
|
3129
3647
|
*
|
3130
3648
|
* @extends pm_node_t
|
3131
3649
|
*/
|
@@ -3133,6 +3651,7 @@ typedef struct pm_global_variable_operator_write_node {
|
|
3133
3651
|
/** The embedded base node. */
|
3134
3652
|
pm_node_t base;
|
3135
3653
|
|
3654
|
+
|
3136
3655
|
/**
|
3137
3656
|
* GlobalVariableOperatorWriteNode#name
|
3138
3657
|
*/
|
@@ -3162,7 +3681,12 @@ typedef struct pm_global_variable_operator_write_node {
|
|
3162
3681
|
/**
|
3163
3682
|
* GlobalVariableOrWriteNode
|
3164
3683
|
*
|
3165
|
-
*
|
3684
|
+
* Represents the use of the `||=` operator for assignment to a global variable.
|
3685
|
+
*
|
3686
|
+
* $target ||= value
|
3687
|
+
* ^^^^^^^^^^^^^^^^^
|
3688
|
+
*
|
3689
|
+
* Type: ::PM_GLOBAL_VARIABLE_OR_WRITE_NODE
|
3166
3690
|
*
|
3167
3691
|
* @extends pm_node_t
|
3168
3692
|
*/
|
@@ -3170,6 +3694,7 @@ typedef struct pm_global_variable_or_write_node {
|
|
3170
3694
|
/** The embedded base node. */
|
3171
3695
|
pm_node_t base;
|
3172
3696
|
|
3697
|
+
|
3173
3698
|
/**
|
3174
3699
|
* GlobalVariableOrWriteNode#name
|
3175
3700
|
*/
|
@@ -3194,7 +3719,12 @@ typedef struct pm_global_variable_or_write_node {
|
|
3194
3719
|
/**
|
3195
3720
|
* GlobalVariableReadNode
|
3196
3721
|
*
|
3197
|
-
*
|
3722
|
+
* Represents referencing a global variable.
|
3723
|
+
*
|
3724
|
+
* $foo
|
3725
|
+
* ^^^^
|
3726
|
+
*
|
3727
|
+
* Type: ::PM_GLOBAL_VARIABLE_READ_NODE
|
3198
3728
|
*
|
3199
3729
|
* @extends pm_node_t
|
3200
3730
|
*/
|
@@ -3202,6 +3732,7 @@ typedef struct pm_global_variable_read_node {
|
|
3202
3732
|
/** The embedded base node. */
|
3203
3733
|
pm_node_t base;
|
3204
3734
|
|
3735
|
+
|
3205
3736
|
/**
|
3206
3737
|
* GlobalVariableReadNode#name
|
3207
3738
|
*
|
@@ -3217,7 +3748,12 @@ typedef struct pm_global_variable_read_node {
|
|
3217
3748
|
/**
|
3218
3749
|
* GlobalVariableTargetNode
|
3219
3750
|
*
|
3220
|
-
*
|
3751
|
+
* Represents writing to a global variable in a context that doesn't have an explicit value.
|
3752
|
+
*
|
3753
|
+
* $foo, $bar = baz
|
3754
|
+
* ^^^^ ^^^^
|
3755
|
+
*
|
3756
|
+
* Type: ::PM_GLOBAL_VARIABLE_TARGET_NODE
|
3221
3757
|
*
|
3222
3758
|
* @extends pm_node_t
|
3223
3759
|
*/
|
@@ -3225,6 +3761,7 @@ typedef struct pm_global_variable_target_node {
|
|
3225
3761
|
/** The embedded base node. */
|
3226
3762
|
pm_node_t base;
|
3227
3763
|
|
3764
|
+
|
3228
3765
|
/**
|
3229
3766
|
* GlobalVariableTargetNode#name
|
3230
3767
|
*/
|
@@ -3234,7 +3771,12 @@ typedef struct pm_global_variable_target_node {
|
|
3234
3771
|
/**
|
3235
3772
|
* GlobalVariableWriteNode
|
3236
3773
|
*
|
3237
|
-
*
|
3774
|
+
* Represents writing to a global variable.
|
3775
|
+
*
|
3776
|
+
* $foo = 1
|
3777
|
+
* ^^^^^^^^
|
3778
|
+
*
|
3779
|
+
* Type: ::PM_GLOBAL_VARIABLE_WRITE_NODE
|
3238
3780
|
*
|
3239
3781
|
* @extends pm_node_t
|
3240
3782
|
*/
|
@@ -3242,6 +3784,7 @@ typedef struct pm_global_variable_write_node {
|
|
3242
3784
|
/** The embedded base node. */
|
3243
3785
|
pm_node_t base;
|
3244
3786
|
|
3787
|
+
|
3245
3788
|
/**
|
3246
3789
|
* GlobalVariableWriteNode#name
|
3247
3790
|
*
|
@@ -3290,7 +3833,12 @@ typedef struct pm_global_variable_write_node {
|
|
3290
3833
|
/**
|
3291
3834
|
* HashNode
|
3292
3835
|
*
|
3293
|
-
*
|
3836
|
+
* Represents a hash literal.
|
3837
|
+
*
|
3838
|
+
* { a => b }
|
3839
|
+
* ^^^^^^^^^^
|
3840
|
+
*
|
3841
|
+
* Type: ::PM_HASH_NODE
|
3294
3842
|
*
|
3295
3843
|
* @extends pm_node_t
|
3296
3844
|
*/
|
@@ -3298,6 +3846,7 @@ typedef struct pm_hash_node {
|
|
3298
3846
|
/** The embedded base node. */
|
3299
3847
|
pm_node_t base;
|
3300
3848
|
|
3849
|
+
|
3301
3850
|
/**
|
3302
3851
|
* HashNode#opening_loc
|
3303
3852
|
*
|
@@ -3335,7 +3884,15 @@ typedef struct pm_hash_node {
|
|
3335
3884
|
/**
|
3336
3885
|
* HashPatternNode
|
3337
3886
|
*
|
3338
|
-
*
|
3887
|
+
* Represents a hash pattern in pattern matching.
|
3888
|
+
*
|
3889
|
+
* foo => { a: 1, b: 2 }
|
3890
|
+
* ^^^^^^^^^^^^^^
|
3891
|
+
*
|
3892
|
+
* foo => { a: 1, b: 2, **c }
|
3893
|
+
* ^^^^^^^^^^^^^^^^^^^
|
3894
|
+
*
|
3895
|
+
* Type: ::PM_HASH_PATTERN_NODE
|
3339
3896
|
*
|
3340
3897
|
* @extends pm_node_t
|
3341
3898
|
*/
|
@@ -3343,6 +3900,7 @@ typedef struct pm_hash_pattern_node {
|
|
3343
3900
|
/** The embedded base node. */
|
3344
3901
|
pm_node_t base;
|
3345
3902
|
|
3903
|
+
|
3346
3904
|
/**
|
3347
3905
|
* HashPatternNode#constant
|
3348
3906
|
*/
|
@@ -3372,7 +3930,18 @@ typedef struct pm_hash_pattern_node {
|
|
3372
3930
|
/**
|
3373
3931
|
* IfNode
|
3374
3932
|
*
|
3375
|
-
*
|
3933
|
+
* Represents the use of the `if` keyword, either in the block form or the modifier form, or a ternary expression.
|
3934
|
+
*
|
3935
|
+
* bar if foo
|
3936
|
+
* ^^^^^^^^^^
|
3937
|
+
*
|
3938
|
+
* if foo then bar end
|
3939
|
+
* ^^^^^^^^^^^^^^^^^^^
|
3940
|
+
*
|
3941
|
+
* foo ? bar : baz
|
3942
|
+
* ^^^^^^^^^^^^^^^
|
3943
|
+
*
|
3944
|
+
* Type: ::PM_IF_NODE
|
3376
3945
|
*
|
3377
3946
|
* @extends pm_node_t
|
3378
3947
|
*/
|
@@ -3380,6 +3949,7 @@ typedef struct pm_if_node {
|
|
3380
3949
|
/** The embedded base node. */
|
3381
3950
|
pm_node_t base;
|
3382
3951
|
|
3952
|
+
|
3383
3953
|
/**
|
3384
3954
|
* IfNode#if_keyword_loc
|
3385
3955
|
*
|
@@ -3438,7 +4008,7 @@ typedef struct pm_if_node {
|
|
3438
4008
|
struct pm_statements_node *statements;
|
3439
4009
|
|
3440
4010
|
/**
|
3441
|
-
* IfNode#
|
4011
|
+
* IfNode#subsequent
|
3442
4012
|
*
|
3443
4013
|
* Represents an `ElseNode` or an `IfNode` when there is an `else` or an `elsif` in the `if` statement.
|
3444
4014
|
*
|
@@ -3454,7 +4024,7 @@ typedef struct pm_if_node {
|
|
3454
4024
|
* if foo then bar else baz end
|
3455
4025
|
* ^^^^^^^^^^^^
|
3456
4026
|
*/
|
3457
|
-
struct pm_node *
|
4027
|
+
struct pm_node *subsequent;
|
3458
4028
|
|
3459
4029
|
/**
|
3460
4030
|
* IfNode#end_keyword_loc
|
@@ -3472,7 +4042,12 @@ typedef struct pm_if_node {
|
|
3472
4042
|
/**
|
3473
4043
|
* ImaginaryNode
|
3474
4044
|
*
|
3475
|
-
*
|
4045
|
+
* Represents an imaginary number literal.
|
4046
|
+
*
|
4047
|
+
* 1.0i
|
4048
|
+
* ^^^^
|
4049
|
+
*
|
4050
|
+
* Type: ::PM_IMAGINARY_NODE
|
3476
4051
|
*
|
3477
4052
|
* @extends pm_node_t
|
3478
4053
|
*/
|
@@ -3480,6 +4055,7 @@ typedef struct pm_imaginary_node {
|
|
3480
4055
|
/** The embedded base node. */
|
3481
4056
|
pm_node_t base;
|
3482
4057
|
|
4058
|
+
|
3483
4059
|
/**
|
3484
4060
|
* ImaginaryNode#numeric
|
3485
4061
|
*/
|
@@ -3489,7 +4065,18 @@ typedef struct pm_imaginary_node {
|
|
3489
4065
|
/**
|
3490
4066
|
* ImplicitNode
|
3491
4067
|
*
|
3492
|
-
*
|
4068
|
+
* Represents a node that is implicitly being added to the tree but doesn't correspond directly to a node in the source.
|
4069
|
+
*
|
4070
|
+
* { foo: }
|
4071
|
+
* ^^^^
|
4072
|
+
*
|
4073
|
+
* { Foo: }
|
4074
|
+
* ^^^^
|
4075
|
+
*
|
4076
|
+
* foo in { bar: }
|
4077
|
+
* ^^^^
|
4078
|
+
*
|
4079
|
+
* Type: ::PM_IMPLICIT_NODE
|
3493
4080
|
*
|
3494
4081
|
* @extends pm_node_t
|
3495
4082
|
*/
|
@@ -3497,6 +4084,7 @@ typedef struct pm_implicit_node {
|
|
3497
4084
|
/** The embedded base node. */
|
3498
4085
|
pm_node_t base;
|
3499
4086
|
|
4087
|
+
|
3500
4088
|
/**
|
3501
4089
|
* ImplicitNode#value
|
3502
4090
|
*/
|
@@ -3506,19 +4094,39 @@ typedef struct pm_implicit_node {
|
|
3506
4094
|
/**
|
3507
4095
|
* ImplicitRestNode
|
3508
4096
|
*
|
3509
|
-
*
|
4097
|
+
* Represents using a trailing comma to indicate an implicit rest parameter.
|
4098
|
+
*
|
4099
|
+
* foo { |bar,| }
|
4100
|
+
* ^
|
4101
|
+
*
|
4102
|
+
* foo in [bar,]
|
4103
|
+
* ^
|
4104
|
+
*
|
4105
|
+
* for foo, in bar do end
|
4106
|
+
* ^
|
4107
|
+
*
|
4108
|
+
* foo, = bar
|
4109
|
+
* ^
|
4110
|
+
*
|
4111
|
+
* Type: ::PM_IMPLICIT_REST_NODE
|
3510
4112
|
*
|
3511
4113
|
* @extends pm_node_t
|
3512
4114
|
*/
|
3513
4115
|
typedef struct pm_implicit_rest_node {
|
3514
4116
|
/** The embedded base node. */
|
3515
4117
|
pm_node_t base;
|
4118
|
+
|
3516
4119
|
} pm_implicit_rest_node_t;
|
3517
4120
|
|
3518
4121
|
/**
|
3519
4122
|
* InNode
|
3520
4123
|
*
|
3521
|
-
*
|
4124
|
+
* Represents the use of the `in` keyword in a case statement.
|
4125
|
+
*
|
4126
|
+
* case a; in b then c end
|
4127
|
+
* ^^^^^^^^^^^
|
4128
|
+
*
|
4129
|
+
* Type: ::PM_IN_NODE
|
3522
4130
|
*
|
3523
4131
|
* @extends pm_node_t
|
3524
4132
|
*/
|
@@ -3526,6 +4134,7 @@ typedef struct pm_in_node {
|
|
3526
4134
|
/** The embedded base node. */
|
3527
4135
|
pm_node_t base;
|
3528
4136
|
|
4137
|
+
|
3529
4138
|
/**
|
3530
4139
|
* InNode#pattern
|
3531
4140
|
*/
|
@@ -3550,12 +4159,18 @@ typedef struct pm_in_node {
|
|
3550
4159
|
/**
|
3551
4160
|
* IndexAndWriteNode
|
3552
4161
|
*
|
3553
|
-
*
|
3554
|
-
*
|
3555
|
-
*
|
3556
|
-
*
|
3557
|
-
*
|
3558
|
-
*
|
4162
|
+
* Represents the use of the `&&=` operator on a call to the `[]` method.
|
4163
|
+
*
|
4164
|
+
* foo.bar[baz] &&= value
|
4165
|
+
* ^^^^^^^^^^^^^^^^^^^^^^
|
4166
|
+
*
|
4167
|
+
* Type: ::PM_INDEX_AND_WRITE_NODE
|
4168
|
+
|
4169
|
+
* Flags (#pm_call_node_flags):
|
4170
|
+
* * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
|
4171
|
+
* * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
|
4172
|
+
* * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
|
4173
|
+
* * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
|
3559
4174
|
*
|
3560
4175
|
* @extends pm_node_t
|
3561
4176
|
*/
|
@@ -3563,6 +4178,7 @@ typedef struct pm_index_and_write_node {
|
|
3563
4178
|
/** The embedded base node. */
|
3564
4179
|
pm_node_t base;
|
3565
4180
|
|
4181
|
+
|
3566
4182
|
/**
|
3567
4183
|
* IndexAndWriteNode#receiver
|
3568
4184
|
*/
|
@@ -3591,7 +4207,7 @@ typedef struct pm_index_and_write_node {
|
|
3591
4207
|
/**
|
3592
4208
|
* IndexAndWriteNode#block
|
3593
4209
|
*/
|
3594
|
-
struct
|
4210
|
+
struct pm_block_argument_node *block;
|
3595
4211
|
|
3596
4212
|
/**
|
3597
4213
|
* IndexAndWriteNode#operator_loc
|
@@ -3607,12 +4223,18 @@ typedef struct pm_index_and_write_node {
|
|
3607
4223
|
/**
|
3608
4224
|
* IndexOperatorWriteNode
|
3609
4225
|
*
|
3610
|
-
*
|
3611
|
-
*
|
3612
|
-
*
|
3613
|
-
*
|
3614
|
-
*
|
3615
|
-
*
|
4226
|
+
* Represents the use of an assignment operator on a call to `[]`.
|
4227
|
+
*
|
4228
|
+
* foo.bar[baz] += value
|
4229
|
+
* ^^^^^^^^^^^^^^^^^^^^^
|
4230
|
+
*
|
4231
|
+
* Type: ::PM_INDEX_OPERATOR_WRITE_NODE
|
4232
|
+
|
4233
|
+
* Flags (#pm_call_node_flags):
|
4234
|
+
* * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
|
4235
|
+
* * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
|
4236
|
+
* * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
|
4237
|
+
* * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
|
3616
4238
|
*
|
3617
4239
|
* @extends pm_node_t
|
3618
4240
|
*/
|
@@ -3620,6 +4242,7 @@ typedef struct pm_index_operator_write_node {
|
|
3620
4242
|
/** The embedded base node. */
|
3621
4243
|
pm_node_t base;
|
3622
4244
|
|
4245
|
+
|
3623
4246
|
/**
|
3624
4247
|
* IndexOperatorWriteNode#receiver
|
3625
4248
|
*/
|
@@ -3648,7 +4271,7 @@ typedef struct pm_index_operator_write_node {
|
|
3648
4271
|
/**
|
3649
4272
|
* IndexOperatorWriteNode#block
|
3650
4273
|
*/
|
3651
|
-
struct
|
4274
|
+
struct pm_block_argument_node *block;
|
3652
4275
|
|
3653
4276
|
/**
|
3654
4277
|
* IndexOperatorWriteNode#binary_operator
|
@@ -3669,12 +4292,18 @@ typedef struct pm_index_operator_write_node {
|
|
3669
4292
|
/**
|
3670
4293
|
* IndexOrWriteNode
|
3671
4294
|
*
|
3672
|
-
*
|
3673
|
-
*
|
3674
|
-
*
|
3675
|
-
*
|
3676
|
-
*
|
3677
|
-
*
|
4295
|
+
* Represents the use of the `||=` operator on a call to `[]`.
|
4296
|
+
*
|
4297
|
+
* foo.bar[baz] ||= value
|
4298
|
+
* ^^^^^^^^^^^^^^^^^^^^^^
|
4299
|
+
*
|
4300
|
+
* Type: ::PM_INDEX_OR_WRITE_NODE
|
4301
|
+
|
4302
|
+
* Flags (#pm_call_node_flags):
|
4303
|
+
* * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
|
4304
|
+
* * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
|
4305
|
+
* * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
|
4306
|
+
* * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
|
3678
4307
|
*
|
3679
4308
|
* @extends pm_node_t
|
3680
4309
|
*/
|
@@ -3682,6 +4311,7 @@ typedef struct pm_index_or_write_node {
|
|
3682
4311
|
/** The embedded base node. */
|
3683
4312
|
pm_node_t base;
|
3684
4313
|
|
4314
|
+
|
3685
4315
|
/**
|
3686
4316
|
* IndexOrWriteNode#receiver
|
3687
4317
|
*/
|
@@ -3710,7 +4340,7 @@ typedef struct pm_index_or_write_node {
|
|
3710
4340
|
/**
|
3711
4341
|
* IndexOrWriteNode#block
|
3712
4342
|
*/
|
3713
|
-
struct
|
4343
|
+
struct pm_block_argument_node *block;
|
3714
4344
|
|
3715
4345
|
/**
|
3716
4346
|
* IndexOrWriteNode#operator_loc
|
@@ -3726,12 +4356,26 @@ typedef struct pm_index_or_write_node {
|
|
3726
4356
|
/**
|
3727
4357
|
* IndexTargetNode
|
3728
4358
|
*
|
3729
|
-
*
|
3730
|
-
*
|
3731
|
-
*
|
3732
|
-
*
|
3733
|
-
*
|
3734
|
-
*
|
4359
|
+
* Represents assigning to an index.
|
4360
|
+
*
|
4361
|
+
* foo[bar], = 1
|
4362
|
+
* ^^^^^^^^
|
4363
|
+
*
|
4364
|
+
* begin
|
4365
|
+
* rescue => foo[bar]
|
4366
|
+
* ^^^^^^^^
|
4367
|
+
* end
|
4368
|
+
*
|
4369
|
+
* for foo[bar] in baz do end
|
4370
|
+
* ^^^^^^^^
|
4371
|
+
*
|
4372
|
+
* Type: ::PM_INDEX_TARGET_NODE
|
4373
|
+
|
4374
|
+
* Flags (#pm_call_node_flags):
|
4375
|
+
* * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
|
4376
|
+
* * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
|
4377
|
+
* * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
|
4378
|
+
* * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
|
3735
4379
|
*
|
3736
4380
|
* @extends pm_node_t
|
3737
4381
|
*/
|
@@ -3739,6 +4383,7 @@ typedef struct pm_index_target_node {
|
|
3739
4383
|
/** The embedded base node. */
|
3740
4384
|
pm_node_t base;
|
3741
4385
|
|
4386
|
+
|
3742
4387
|
/**
|
3743
4388
|
* IndexTargetNode#receiver
|
3744
4389
|
*/
|
@@ -3762,13 +4407,18 @@ typedef struct pm_index_target_node {
|
|
3762
4407
|
/**
|
3763
4408
|
* IndexTargetNode#block
|
3764
4409
|
*/
|
3765
|
-
struct
|
4410
|
+
struct pm_block_argument_node *block;
|
3766
4411
|
} pm_index_target_node_t;
|
3767
4412
|
|
3768
4413
|
/**
|
3769
4414
|
* InstanceVariableAndWriteNode
|
3770
4415
|
*
|
3771
|
-
*
|
4416
|
+
* Represents the use of the `&&=` operator for assignment to an instance variable.
|
4417
|
+
*
|
4418
|
+
* @target &&= value
|
4419
|
+
* ^^^^^^^^^^^^^^^^^
|
4420
|
+
*
|
4421
|
+
* Type: ::PM_INSTANCE_VARIABLE_AND_WRITE_NODE
|
3772
4422
|
*
|
3773
4423
|
* @extends pm_node_t
|
3774
4424
|
*/
|
@@ -3776,6 +4426,7 @@ typedef struct pm_instance_variable_and_write_node {
|
|
3776
4426
|
/** The embedded base node. */
|
3777
4427
|
pm_node_t base;
|
3778
4428
|
|
4429
|
+
|
3779
4430
|
/**
|
3780
4431
|
* InstanceVariableAndWriteNode#name
|
3781
4432
|
*/
|
@@ -3800,7 +4451,12 @@ typedef struct pm_instance_variable_and_write_node {
|
|
3800
4451
|
/**
|
3801
4452
|
* InstanceVariableOperatorWriteNode
|
3802
4453
|
*
|
3803
|
-
*
|
4454
|
+
* Represents assigning to an instance variable using an operator that isn't `=`.
|
4455
|
+
*
|
4456
|
+
* @target += value
|
4457
|
+
* ^^^^^^^^^^^^^^^^
|
4458
|
+
*
|
4459
|
+
* Type: ::PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE
|
3804
4460
|
*
|
3805
4461
|
* @extends pm_node_t
|
3806
4462
|
*/
|
@@ -3808,6 +4464,7 @@ typedef struct pm_instance_variable_operator_write_node {
|
|
3808
4464
|
/** The embedded base node. */
|
3809
4465
|
pm_node_t base;
|
3810
4466
|
|
4467
|
+
|
3811
4468
|
/**
|
3812
4469
|
* InstanceVariableOperatorWriteNode#name
|
3813
4470
|
*/
|
@@ -3837,7 +4494,12 @@ typedef struct pm_instance_variable_operator_write_node {
|
|
3837
4494
|
/**
|
3838
4495
|
* InstanceVariableOrWriteNode
|
3839
4496
|
*
|
3840
|
-
*
|
4497
|
+
* Represents the use of the `||=` operator for assignment to an instance variable.
|
4498
|
+
*
|
4499
|
+
* @target ||= value
|
4500
|
+
* ^^^^^^^^^^^^^^^^^
|
4501
|
+
*
|
4502
|
+
* Type: ::PM_INSTANCE_VARIABLE_OR_WRITE_NODE
|
3841
4503
|
*
|
3842
4504
|
* @extends pm_node_t
|
3843
4505
|
*/
|
@@ -3845,6 +4507,7 @@ typedef struct pm_instance_variable_or_write_node {
|
|
3845
4507
|
/** The embedded base node. */
|
3846
4508
|
pm_node_t base;
|
3847
4509
|
|
4510
|
+
|
3848
4511
|
/**
|
3849
4512
|
* InstanceVariableOrWriteNode#name
|
3850
4513
|
*/
|
@@ -3869,7 +4532,12 @@ typedef struct pm_instance_variable_or_write_node {
|
|
3869
4532
|
/**
|
3870
4533
|
* InstanceVariableReadNode
|
3871
4534
|
*
|
3872
|
-
*
|
4535
|
+
* Represents referencing an instance variable.
|
4536
|
+
*
|
4537
|
+
* @foo
|
4538
|
+
* ^^^^
|
4539
|
+
*
|
4540
|
+
* Type: ::PM_INSTANCE_VARIABLE_READ_NODE
|
3873
4541
|
*
|
3874
4542
|
* @extends pm_node_t
|
3875
4543
|
*/
|
@@ -3877,6 +4545,7 @@ typedef struct pm_instance_variable_read_node {
|
|
3877
4545
|
/** The embedded base node. */
|
3878
4546
|
pm_node_t base;
|
3879
4547
|
|
4548
|
+
|
3880
4549
|
/**
|
3881
4550
|
* InstanceVariableReadNode#name
|
3882
4551
|
*
|
@@ -3892,7 +4561,12 @@ typedef struct pm_instance_variable_read_node {
|
|
3892
4561
|
/**
|
3893
4562
|
* InstanceVariableTargetNode
|
3894
4563
|
*
|
3895
|
-
*
|
4564
|
+
* Represents writing to an instance variable in a context that doesn't have an explicit value.
|
4565
|
+
*
|
4566
|
+
* @foo, @bar = baz
|
4567
|
+
* ^^^^ ^^^^
|
4568
|
+
*
|
4569
|
+
* Type: ::PM_INSTANCE_VARIABLE_TARGET_NODE
|
3896
4570
|
*
|
3897
4571
|
* @extends pm_node_t
|
3898
4572
|
*/
|
@@ -3900,6 +4574,7 @@ typedef struct pm_instance_variable_target_node {
|
|
3900
4574
|
/** The embedded base node. */
|
3901
4575
|
pm_node_t base;
|
3902
4576
|
|
4577
|
+
|
3903
4578
|
/**
|
3904
4579
|
* InstanceVariableTargetNode#name
|
3905
4580
|
*/
|
@@ -3909,7 +4584,12 @@ typedef struct pm_instance_variable_target_node {
|
|
3909
4584
|
/**
|
3910
4585
|
* InstanceVariableWriteNode
|
3911
4586
|
*
|
3912
|
-
*
|
4587
|
+
* Represents writing to an instance variable.
|
4588
|
+
*
|
4589
|
+
* @foo = 1
|
4590
|
+
* ^^^^^^^^
|
4591
|
+
*
|
4592
|
+
* Type: ::PM_INSTANCE_VARIABLE_WRITE_NODE
|
3913
4593
|
*
|
3914
4594
|
* @extends pm_node_t
|
3915
4595
|
*/
|
@@ -3917,6 +4597,7 @@ typedef struct pm_instance_variable_write_node {
|
|
3917
4597
|
/** The embedded base node. */
|
3918
4598
|
pm_node_t base;
|
3919
4599
|
|
4600
|
+
|
3920
4601
|
/**
|
3921
4602
|
* InstanceVariableWriteNode#name
|
3922
4603
|
*
|
@@ -3965,12 +4646,18 @@ typedef struct pm_instance_variable_write_node {
|
|
3965
4646
|
/**
|
3966
4647
|
* IntegerNode
|
3967
4648
|
*
|
3968
|
-
*
|
3969
|
-
*
|
3970
|
-
*
|
3971
|
-
*
|
3972
|
-
*
|
3973
|
-
*
|
4649
|
+
* Represents an integer number literal.
|
4650
|
+
*
|
4651
|
+
* 1
|
4652
|
+
* ^
|
4653
|
+
*
|
4654
|
+
* Type: ::PM_INTEGER_NODE
|
4655
|
+
|
4656
|
+
* Flags (#pm_integer_base_flags):
|
4657
|
+
* * ::PM_INTEGER_BASE_FLAGS_BINARY
|
4658
|
+
* * ::PM_INTEGER_BASE_FLAGS_DECIMAL
|
4659
|
+
* * ::PM_INTEGER_BASE_FLAGS_OCTAL
|
4660
|
+
* * ::PM_INTEGER_BASE_FLAGS_HEXADECIMAL
|
3974
4661
|
*
|
3975
4662
|
* @extends pm_node_t
|
3976
4663
|
*/
|
@@ -3978,6 +4665,7 @@ typedef struct pm_integer_node {
|
|
3978
4665
|
/** The embedded base node. */
|
3979
4666
|
pm_node_t base;
|
3980
4667
|
|
4668
|
+
|
3981
4669
|
/**
|
3982
4670
|
* IntegerNode#value
|
3983
4671
|
*
|
@@ -3989,19 +4677,25 @@ typedef struct pm_integer_node {
|
|
3989
4677
|
/**
|
3990
4678
|
* InterpolatedMatchLastLineNode
|
3991
4679
|
*
|
3992
|
-
*
|
3993
|
-
*
|
3994
|
-
*
|
3995
|
-
*
|
3996
|
-
*
|
3997
|
-
*
|
3998
|
-
|
3999
|
-
*
|
4000
|
-
*
|
4001
|
-
*
|
4002
|
-
*
|
4003
|
-
*
|
4004
|
-
*
|
4680
|
+
* Represents a regular expression literal that contains interpolation that is being used in the predicate of a conditional to implicitly match against the last line read by an IO object.
|
4681
|
+
*
|
4682
|
+
* if /foo #{bar} baz/ then end
|
4683
|
+
* ^^^^^^^^^^^^^^^^
|
4684
|
+
*
|
4685
|
+
* Type: ::PM_INTERPOLATED_MATCH_LAST_LINE_NODE
|
4686
|
+
|
4687
|
+
* Flags (#pm_regular_expression_flags):
|
4688
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE
|
4689
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_EXTENDED
|
4690
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE
|
4691
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_ONCE
|
4692
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_EUC_JP
|
4693
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT
|
4694
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J
|
4695
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_UTF_8
|
4696
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING
|
4697
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING
|
4698
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING
|
4005
4699
|
*
|
4006
4700
|
* @extends pm_node_t
|
4007
4701
|
*/
|
@@ -4009,6 +4703,7 @@ typedef struct pm_interpolated_match_last_line_node {
|
|
4009
4703
|
/** The embedded base node. */
|
4010
4704
|
pm_node_t base;
|
4011
4705
|
|
4706
|
+
|
4012
4707
|
/**
|
4013
4708
|
* InterpolatedMatchLastLineNode#opening_loc
|
4014
4709
|
*/
|
@@ -4028,19 +4723,25 @@ typedef struct pm_interpolated_match_last_line_node {
|
|
4028
4723
|
/**
|
4029
4724
|
* InterpolatedRegularExpressionNode
|
4030
4725
|
*
|
4031
|
-
*
|
4032
|
-
*
|
4033
|
-
*
|
4034
|
-
*
|
4035
|
-
*
|
4036
|
-
*
|
4037
|
-
|
4038
|
-
*
|
4039
|
-
*
|
4040
|
-
*
|
4041
|
-
*
|
4042
|
-
*
|
4043
|
-
*
|
4726
|
+
* Represents a regular expression literal that contains interpolation.
|
4727
|
+
*
|
4728
|
+
* /foo #{bar} baz/
|
4729
|
+
* ^^^^^^^^^^^^^^^^
|
4730
|
+
*
|
4731
|
+
* Type: ::PM_INTERPOLATED_REGULAR_EXPRESSION_NODE
|
4732
|
+
|
4733
|
+
* Flags (#pm_regular_expression_flags):
|
4734
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE
|
4735
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_EXTENDED
|
4736
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE
|
4737
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_ONCE
|
4738
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_EUC_JP
|
4739
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT
|
4740
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J
|
4741
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_UTF_8
|
4742
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING
|
4743
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING
|
4744
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING
|
4044
4745
|
*
|
4045
4746
|
* @extends pm_node_t
|
4046
4747
|
*/
|
@@ -4048,6 +4749,7 @@ typedef struct pm_interpolated_regular_expression_node {
|
|
4048
4749
|
/** The embedded base node. */
|
4049
4750
|
pm_node_t base;
|
4050
4751
|
|
4752
|
+
|
4051
4753
|
/**
|
4052
4754
|
* InterpolatedRegularExpressionNode#opening_loc
|
4053
4755
|
*/
|
@@ -4067,10 +4769,16 @@ typedef struct pm_interpolated_regular_expression_node {
|
|
4067
4769
|
/**
|
4068
4770
|
* InterpolatedStringNode
|
4069
4771
|
*
|
4070
|
-
*
|
4071
|
-
*
|
4072
|
-
*
|
4073
|
-
*
|
4772
|
+
* Represents a string literal that contains interpolation.
|
4773
|
+
*
|
4774
|
+
* "foo #{bar} baz"
|
4775
|
+
* ^^^^^^^^^^^^^^^^
|
4776
|
+
*
|
4777
|
+
* Type: ::PM_INTERPOLATED_STRING_NODE
|
4778
|
+
|
4779
|
+
* Flags (#pm_interpolated_string_node_flags):
|
4780
|
+
* * ::PM_INTERPOLATED_STRING_NODE_FLAGS_FROZEN
|
4781
|
+
* * ::PM_INTERPOLATED_STRING_NODE_FLAGS_MUTABLE
|
4074
4782
|
*
|
4075
4783
|
* @extends pm_node_t
|
4076
4784
|
*/
|
@@ -4078,6 +4786,7 @@ typedef struct pm_interpolated_string_node {
|
|
4078
4786
|
/** The embedded base node. */
|
4079
4787
|
pm_node_t base;
|
4080
4788
|
|
4789
|
+
|
4081
4790
|
/**
|
4082
4791
|
* InterpolatedStringNode#opening_loc
|
4083
4792
|
*/
|
@@ -4097,7 +4806,12 @@ typedef struct pm_interpolated_string_node {
|
|
4097
4806
|
/**
|
4098
4807
|
* InterpolatedSymbolNode
|
4099
4808
|
*
|
4100
|
-
*
|
4809
|
+
* Represents a symbol literal that contains interpolation.
|
4810
|
+
*
|
4811
|
+
* :"foo #{bar} baz"
|
4812
|
+
* ^^^^^^^^^^^^^^^^^
|
4813
|
+
*
|
4814
|
+
* Type: ::PM_INTERPOLATED_SYMBOL_NODE
|
4101
4815
|
*
|
4102
4816
|
* @extends pm_node_t
|
4103
4817
|
*/
|
@@ -4105,6 +4819,7 @@ typedef struct pm_interpolated_symbol_node {
|
|
4105
4819
|
/** The embedded base node. */
|
4106
4820
|
pm_node_t base;
|
4107
4821
|
|
4822
|
+
|
4108
4823
|
/**
|
4109
4824
|
* InterpolatedSymbolNode#opening_loc
|
4110
4825
|
*/
|
@@ -4124,7 +4839,12 @@ typedef struct pm_interpolated_symbol_node {
|
|
4124
4839
|
/**
|
4125
4840
|
* InterpolatedXStringNode
|
4126
4841
|
*
|
4127
|
-
*
|
4842
|
+
* Represents an xstring literal that contains interpolation.
|
4843
|
+
*
|
4844
|
+
* `foo #{bar} baz`
|
4845
|
+
* ^^^^^^^^^^^^^^^^
|
4846
|
+
*
|
4847
|
+
* Type: ::PM_INTERPOLATED_X_STRING_NODE
|
4128
4848
|
*
|
4129
4849
|
* @extends pm_node_t
|
4130
4850
|
*/
|
@@ -4132,6 +4852,7 @@ typedef struct pm_interpolated_x_string_node {
|
|
4132
4852
|
/** The embedded base node. */
|
4133
4853
|
pm_node_t base;
|
4134
4854
|
|
4855
|
+
|
4135
4856
|
/**
|
4136
4857
|
* InterpolatedXStringNode#opening_loc
|
4137
4858
|
*/
|
@@ -4148,24 +4869,54 @@ typedef struct pm_interpolated_x_string_node {
|
|
4148
4869
|
pm_location_t closing_loc;
|
4149
4870
|
} pm_interpolated_x_string_node_t;
|
4150
4871
|
|
4872
|
+
/**
|
4873
|
+
* ItLocalVariableReadNode
|
4874
|
+
*
|
4875
|
+
* Represents reading from the implicit `it` local variable.
|
4876
|
+
*
|
4877
|
+
* -> { it }
|
4878
|
+
* ^^
|
4879
|
+
*
|
4880
|
+
* Type: ::PM_IT_LOCAL_VARIABLE_READ_NODE
|
4881
|
+
*
|
4882
|
+
* @extends pm_node_t
|
4883
|
+
*/
|
4884
|
+
typedef struct pm_it_local_variable_read_node {
|
4885
|
+
/** The embedded base node. */
|
4886
|
+
pm_node_t base;
|
4887
|
+
|
4888
|
+
} pm_it_local_variable_read_node_t;
|
4889
|
+
|
4151
4890
|
/**
|
4152
4891
|
* ItParametersNode
|
4153
4892
|
*
|
4154
|
-
*
|
4893
|
+
* Represents an implicit set of parameters through the use of the `it` keyword within a block or lambda.
|
4894
|
+
*
|
4895
|
+
* -> { it + it }
|
4896
|
+
* ^^^^^^^^^^^^^^
|
4897
|
+
*
|
4898
|
+
* Type: ::PM_IT_PARAMETERS_NODE
|
4155
4899
|
*
|
4156
4900
|
* @extends pm_node_t
|
4157
4901
|
*/
|
4158
4902
|
typedef struct pm_it_parameters_node {
|
4159
4903
|
/** The embedded base node. */
|
4160
4904
|
pm_node_t base;
|
4905
|
+
|
4161
4906
|
} pm_it_parameters_node_t;
|
4162
4907
|
|
4163
4908
|
/**
|
4164
4909
|
* KeywordHashNode
|
4165
4910
|
*
|
4166
|
-
*
|
4167
|
-
*
|
4168
|
-
*
|
4911
|
+
* Represents a hash literal without opening and closing braces.
|
4912
|
+
*
|
4913
|
+
* foo(a: b)
|
4914
|
+
* ^^^^
|
4915
|
+
*
|
4916
|
+
* Type: ::PM_KEYWORD_HASH_NODE
|
4917
|
+
|
4918
|
+
* Flags (#pm_keyword_hash_node_flags):
|
4919
|
+
* * ::PM_KEYWORD_HASH_NODE_FLAGS_SYMBOL_KEYS
|
4169
4920
|
*
|
4170
4921
|
* @extends pm_node_t
|
4171
4922
|
*/
|
@@ -4173,6 +4924,7 @@ typedef struct pm_keyword_hash_node {
|
|
4173
4924
|
/** The embedded base node. */
|
4174
4925
|
pm_node_t base;
|
4175
4926
|
|
4927
|
+
|
4176
4928
|
/**
|
4177
4929
|
* KeywordHashNode#elements
|
4178
4930
|
*/
|
@@ -4182,9 +4934,16 @@ typedef struct pm_keyword_hash_node {
|
|
4182
4934
|
/**
|
4183
4935
|
* KeywordRestParameterNode
|
4184
4936
|
*
|
4185
|
-
*
|
4186
|
-
*
|
4187
|
-
*
|
4937
|
+
* Represents a keyword rest parameter to a method, block, or lambda definition.
|
4938
|
+
*
|
4939
|
+
* def a(**b)
|
4940
|
+
* ^^^
|
4941
|
+
* end
|
4942
|
+
*
|
4943
|
+
* Type: ::PM_KEYWORD_REST_PARAMETER_NODE
|
4944
|
+
|
4945
|
+
* Flags (#pm_parameter_flags):
|
4946
|
+
* * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER
|
4188
4947
|
*
|
4189
4948
|
* @extends pm_node_t
|
4190
4949
|
*/
|
@@ -4192,6 +4951,7 @@ typedef struct pm_keyword_rest_parameter_node {
|
|
4192
4951
|
/** The embedded base node. */
|
4193
4952
|
pm_node_t base;
|
4194
4953
|
|
4954
|
+
|
4195
4955
|
/**
|
4196
4956
|
* KeywordRestParameterNode#name
|
4197
4957
|
*/
|
@@ -4211,7 +4971,12 @@ typedef struct pm_keyword_rest_parameter_node {
|
|
4211
4971
|
/**
|
4212
4972
|
* LambdaNode
|
4213
4973
|
*
|
4214
|
-
*
|
4974
|
+
* Represents using a lambda literal (not the lambda method call).
|
4975
|
+
*
|
4976
|
+
* ->(value) { value * 2 }
|
4977
|
+
* ^^^^^^^^^^^^^^^^^^^^^^^
|
4978
|
+
*
|
4979
|
+
* Type: ::PM_LAMBDA_NODE
|
4215
4980
|
*
|
4216
4981
|
* @extends pm_node_t
|
4217
4982
|
*/
|
@@ -4219,6 +4984,7 @@ typedef struct pm_lambda_node {
|
|
4219
4984
|
/** The embedded base node. */
|
4220
4985
|
pm_node_t base;
|
4221
4986
|
|
4987
|
+
|
4222
4988
|
/**
|
4223
4989
|
* LambdaNode#locals
|
4224
4990
|
*/
|
@@ -4253,7 +5019,12 @@ typedef struct pm_lambda_node {
|
|
4253
5019
|
/**
|
4254
5020
|
* LocalVariableAndWriteNode
|
4255
5021
|
*
|
4256
|
-
*
|
5022
|
+
* Represents the use of the `&&=` operator for assignment to a local variable.
|
5023
|
+
*
|
5024
|
+
* target &&= value
|
5025
|
+
* ^^^^^^^^^^^^^^^^
|
5026
|
+
*
|
5027
|
+
* Type: ::PM_LOCAL_VARIABLE_AND_WRITE_NODE
|
4257
5028
|
*
|
4258
5029
|
* @extends pm_node_t
|
4259
5030
|
*/
|
@@ -4261,6 +5032,7 @@ typedef struct pm_local_variable_and_write_node {
|
|
4261
5032
|
/** The embedded base node. */
|
4262
5033
|
pm_node_t base;
|
4263
5034
|
|
5035
|
+
|
4264
5036
|
/**
|
4265
5037
|
* LocalVariableAndWriteNode#name_loc
|
4266
5038
|
*/
|
@@ -4290,7 +5062,12 @@ typedef struct pm_local_variable_and_write_node {
|
|
4290
5062
|
/**
|
4291
5063
|
* LocalVariableOperatorWriteNode
|
4292
5064
|
*
|
4293
|
-
*
|
5065
|
+
* Represents assigning to a local variable using an operator that isn't `=`.
|
5066
|
+
*
|
5067
|
+
* target += value
|
5068
|
+
* ^^^^^^^^^^^^^^^
|
5069
|
+
*
|
5070
|
+
* Type: ::PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE
|
4294
5071
|
*
|
4295
5072
|
* @extends pm_node_t
|
4296
5073
|
*/
|
@@ -4298,6 +5075,7 @@ typedef struct pm_local_variable_operator_write_node {
|
|
4298
5075
|
/** The embedded base node. */
|
4299
5076
|
pm_node_t base;
|
4300
5077
|
|
5078
|
+
|
4301
5079
|
/**
|
4302
5080
|
* LocalVariableOperatorWriteNode#name_loc
|
4303
5081
|
*/
|
@@ -4332,7 +5110,12 @@ typedef struct pm_local_variable_operator_write_node {
|
|
4332
5110
|
/**
|
4333
5111
|
* LocalVariableOrWriteNode
|
4334
5112
|
*
|
4335
|
-
*
|
5113
|
+
* Represents the use of the `||=` operator for assignment to a local variable.
|
5114
|
+
*
|
5115
|
+
* target ||= value
|
5116
|
+
* ^^^^^^^^^^^^^^^^
|
5117
|
+
*
|
5118
|
+
* Type: ::PM_LOCAL_VARIABLE_OR_WRITE_NODE
|
4336
5119
|
*
|
4337
5120
|
* @extends pm_node_t
|
4338
5121
|
*/
|
@@ -4340,6 +5123,7 @@ typedef struct pm_local_variable_or_write_node {
|
|
4340
5123
|
/** The embedded base node. */
|
4341
5124
|
pm_node_t base;
|
4342
5125
|
|
5126
|
+
|
4343
5127
|
/**
|
4344
5128
|
* LocalVariableOrWriteNode#name_loc
|
4345
5129
|
*/
|
@@ -4369,7 +5153,12 @@ typedef struct pm_local_variable_or_write_node {
|
|
4369
5153
|
/**
|
4370
5154
|
* LocalVariableReadNode
|
4371
5155
|
*
|
4372
|
-
*
|
5156
|
+
* Represents reading a local variable. Note that this requires that a local variable of the same name has already been written to in the same scope, otherwise it is parsed as a method call.
|
5157
|
+
*
|
5158
|
+
* foo
|
5159
|
+
* ^^^
|
5160
|
+
*
|
5161
|
+
* Type: ::PM_LOCAL_VARIABLE_READ_NODE
|
4373
5162
|
*
|
4374
5163
|
* @extends pm_node_t
|
4375
5164
|
*/
|
@@ -4377,6 +5166,7 @@ typedef struct pm_local_variable_read_node {
|
|
4377
5166
|
/** The embedded base node. */
|
4378
5167
|
pm_node_t base;
|
4379
5168
|
|
5169
|
+
|
4380
5170
|
/**
|
4381
5171
|
* LocalVariableReadNode#name
|
4382
5172
|
*
|
@@ -4389,10 +5179,6 @@ typedef struct pm_local_variable_read_node {
|
|
4389
5179
|
* Note that this can also be an underscore followed by a number for the default block parameters.
|
4390
5180
|
*
|
4391
5181
|
* _1 # name `:_1`
|
4392
|
-
*
|
4393
|
-
* Finally, for the default `it` block parameter, the name is `0it`. This is to distinguish it from an `it` local variable that is explicitly declared.
|
4394
|
-
*
|
4395
|
-
* it # name `:0it`
|
4396
5182
|
*/
|
4397
5183
|
pm_constant_id_t name;
|
4398
5184
|
|
@@ -4413,7 +5199,12 @@ typedef struct pm_local_variable_read_node {
|
|
4413
5199
|
/**
|
4414
5200
|
* LocalVariableTargetNode
|
4415
5201
|
*
|
4416
|
-
*
|
5202
|
+
* Represents writing to a local variable in a context that doesn't have an explicit value.
|
5203
|
+
*
|
5204
|
+
* foo, bar = baz
|
5205
|
+
* ^^^ ^^^
|
5206
|
+
*
|
5207
|
+
* Type: ::PM_LOCAL_VARIABLE_TARGET_NODE
|
4417
5208
|
*
|
4418
5209
|
* @extends pm_node_t
|
4419
5210
|
*/
|
@@ -4421,6 +5212,7 @@ typedef struct pm_local_variable_target_node {
|
|
4421
5212
|
/** The embedded base node. */
|
4422
5213
|
pm_node_t base;
|
4423
5214
|
|
5215
|
+
|
4424
5216
|
/**
|
4425
5217
|
* LocalVariableTargetNode#name
|
4426
5218
|
*/
|
@@ -4435,7 +5227,12 @@ typedef struct pm_local_variable_target_node {
|
|
4435
5227
|
/**
|
4436
5228
|
* LocalVariableWriteNode
|
4437
5229
|
*
|
4438
|
-
*
|
5230
|
+
* Represents writing to a local variable.
|
5231
|
+
*
|
5232
|
+
* foo = 1
|
5233
|
+
* ^^^^^^^
|
5234
|
+
*
|
5235
|
+
* Type: ::PM_LOCAL_VARIABLE_WRITE_NODE
|
4439
5236
|
*
|
4440
5237
|
* @extends pm_node_t
|
4441
5238
|
*/
|
@@ -4443,6 +5240,7 @@ typedef struct pm_local_variable_write_node {
|
|
4443
5240
|
/** The embedded base node. */
|
4444
5241
|
pm_node_t base;
|
4445
5242
|
|
5243
|
+
|
4446
5244
|
/**
|
4447
5245
|
* LocalVariableWriteNode#name
|
4448
5246
|
*
|
@@ -4508,19 +5306,25 @@ typedef struct pm_local_variable_write_node {
|
|
4508
5306
|
/**
|
4509
5307
|
* MatchLastLineNode
|
4510
5308
|
*
|
4511
|
-
*
|
4512
|
-
*
|
4513
|
-
*
|
4514
|
-
*
|
4515
|
-
*
|
4516
|
-
*
|
4517
|
-
|
4518
|
-
*
|
4519
|
-
*
|
4520
|
-
*
|
4521
|
-
*
|
4522
|
-
*
|
4523
|
-
*
|
5309
|
+
* Represents a regular expression literal used in the predicate of a conditional to implicitly match against the last line read by an IO object.
|
5310
|
+
*
|
5311
|
+
* if /foo/i then end
|
5312
|
+
* ^^^^^^
|
5313
|
+
*
|
5314
|
+
* Type: ::PM_MATCH_LAST_LINE_NODE
|
5315
|
+
|
5316
|
+
* Flags (#pm_regular_expression_flags):
|
5317
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE
|
5318
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_EXTENDED
|
5319
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE
|
5320
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_ONCE
|
5321
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_EUC_JP
|
5322
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT
|
5323
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J
|
5324
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_UTF_8
|
5325
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING
|
5326
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING
|
5327
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING
|
4524
5328
|
*
|
4525
5329
|
* @extends pm_node_t
|
4526
5330
|
*/
|
@@ -4528,6 +5332,7 @@ typedef struct pm_match_last_line_node {
|
|
4528
5332
|
/** The embedded base node. */
|
4529
5333
|
pm_node_t base;
|
4530
5334
|
|
5335
|
+
|
4531
5336
|
/**
|
4532
5337
|
* MatchLastLineNode#opening_loc
|
4533
5338
|
*/
|
@@ -4552,7 +5357,12 @@ typedef struct pm_match_last_line_node {
|
|
4552
5357
|
/**
|
4553
5358
|
* MatchPredicateNode
|
4554
5359
|
*
|
4555
|
-
*
|
5360
|
+
* Represents the use of the modifier `in` operator.
|
5361
|
+
*
|
5362
|
+
* foo in bar
|
5363
|
+
* ^^^^^^^^^^
|
5364
|
+
*
|
5365
|
+
* Type: ::PM_MATCH_PREDICATE_NODE
|
4556
5366
|
*
|
4557
5367
|
* @extends pm_node_t
|
4558
5368
|
*/
|
@@ -4560,6 +5370,7 @@ typedef struct pm_match_predicate_node {
|
|
4560
5370
|
/** The embedded base node. */
|
4561
5371
|
pm_node_t base;
|
4562
5372
|
|
5373
|
+
|
4563
5374
|
/**
|
4564
5375
|
* MatchPredicateNode#value
|
4565
5376
|
*/
|
@@ -4579,7 +5390,12 @@ typedef struct pm_match_predicate_node {
|
|
4579
5390
|
/**
|
4580
5391
|
* MatchRequiredNode
|
4581
5392
|
*
|
4582
|
-
*
|
5393
|
+
* Represents the use of the `=>` operator.
|
5394
|
+
*
|
5395
|
+
* foo => bar
|
5396
|
+
* ^^^^^^^^^^
|
5397
|
+
*
|
5398
|
+
* Type: ::PM_MATCH_REQUIRED_NODE
|
4583
5399
|
*
|
4584
5400
|
* @extends pm_node_t
|
4585
5401
|
*/
|
@@ -4587,6 +5403,7 @@ typedef struct pm_match_required_node {
|
|
4587
5403
|
/** The embedded base node. */
|
4588
5404
|
pm_node_t base;
|
4589
5405
|
|
5406
|
+
|
4590
5407
|
/**
|
4591
5408
|
* MatchRequiredNode#value
|
4592
5409
|
*/
|
@@ -4606,7 +5423,12 @@ typedef struct pm_match_required_node {
|
|
4606
5423
|
/**
|
4607
5424
|
* MatchWriteNode
|
4608
5425
|
*
|
4609
|
-
*
|
5426
|
+
* Represents writing local variables using a regular expression match with named capture groups.
|
5427
|
+
*
|
5428
|
+
* /(?<foo>bar)/ =~ baz
|
5429
|
+
* ^^^^^^^^^^^^^^^^^^^^
|
5430
|
+
*
|
5431
|
+
* Type: ::PM_MATCH_WRITE_NODE
|
4610
5432
|
*
|
4611
5433
|
* @extends pm_node_t
|
4612
5434
|
*/
|
@@ -4614,6 +5436,7 @@ typedef struct pm_match_write_node {
|
|
4614
5436
|
/** The embedded base node. */
|
4615
5437
|
pm_node_t base;
|
4616
5438
|
|
5439
|
+
|
4617
5440
|
/**
|
4618
5441
|
* MatchWriteNode#call
|
4619
5442
|
*/
|
@@ -4628,19 +5451,27 @@ typedef struct pm_match_write_node {
|
|
4628
5451
|
/**
|
4629
5452
|
* MissingNode
|
4630
5453
|
*
|
4631
|
-
*
|
5454
|
+
* Represents a node that is missing from the source and results in a syntax error.
|
5455
|
+
*
|
5456
|
+
* Type: ::PM_MISSING_NODE
|
4632
5457
|
*
|
4633
5458
|
* @extends pm_node_t
|
4634
5459
|
*/
|
4635
5460
|
typedef struct pm_missing_node {
|
4636
5461
|
/** The embedded base node. */
|
4637
5462
|
pm_node_t base;
|
5463
|
+
|
4638
5464
|
} pm_missing_node_t;
|
4639
5465
|
|
4640
5466
|
/**
|
4641
5467
|
* ModuleNode
|
4642
5468
|
*
|
4643
|
-
*
|
5469
|
+
* Represents a module declaration involving the `module` keyword.
|
5470
|
+
*
|
5471
|
+
* module Foo end
|
5472
|
+
* ^^^^^^^^^^^^^^
|
5473
|
+
*
|
5474
|
+
* Type: ::PM_MODULE_NODE
|
4644
5475
|
*
|
4645
5476
|
* @extends pm_node_t
|
4646
5477
|
*/
|
@@ -4648,6 +5479,7 @@ typedef struct pm_module_node {
|
|
4648
5479
|
/** The embedded base node. */
|
4649
5480
|
pm_node_t base;
|
4650
5481
|
|
5482
|
+
|
4651
5483
|
/**
|
4652
5484
|
* ModuleNode#locals
|
4653
5485
|
*/
|
@@ -4682,7 +5514,17 @@ typedef struct pm_module_node {
|
|
4682
5514
|
/**
|
4683
5515
|
* MultiTargetNode
|
4684
5516
|
*
|
4685
|
-
*
|
5517
|
+
* Represents a multi-target expression.
|
5518
|
+
*
|
5519
|
+
* a, (b, c) = 1, 2, 3
|
5520
|
+
* ^^^^^^
|
5521
|
+
*
|
5522
|
+
* This can be a part of `MultiWriteNode` as above, or the target of a `for` loop
|
5523
|
+
*
|
5524
|
+
* for a, b in [[1, 2], [3, 4]]
|
5525
|
+
* ^^^^
|
5526
|
+
*
|
5527
|
+
* Type: ::PM_MULTI_TARGET_NODE
|
4686
5528
|
*
|
4687
5529
|
* @extends pm_node_t
|
4688
5530
|
*/
|
@@ -4690,28 +5532,69 @@ typedef struct pm_multi_target_node {
|
|
4690
5532
|
/** The embedded base node. */
|
4691
5533
|
pm_node_t base;
|
4692
5534
|
|
5535
|
+
|
4693
5536
|
/**
|
4694
5537
|
* MultiTargetNode#lefts
|
5538
|
+
*
|
5539
|
+
* Represents the targets expressions before a splat node.
|
5540
|
+
*
|
5541
|
+
* a, (b, c, *) = 1, 2, 3, 4, 5
|
5542
|
+
* ^^^^
|
5543
|
+
*
|
5544
|
+
* The splat node can be absent, in that case all target expressions are in the left field.
|
5545
|
+
*
|
5546
|
+
* a, (b, c) = 1, 2, 3, 4, 5
|
5547
|
+
* ^^^^
|
4695
5548
|
*/
|
4696
5549
|
struct pm_node_list lefts;
|
4697
5550
|
|
4698
5551
|
/**
|
4699
5552
|
* MultiTargetNode#rest
|
5553
|
+
*
|
5554
|
+
* Represents a splat node in the target expression.
|
5555
|
+
*
|
5556
|
+
* a, (b, *c) = 1, 2, 3, 4
|
5557
|
+
* ^^
|
5558
|
+
*
|
5559
|
+
* The variable can be empty, this results in a `SplatNode` with a `nil` expression field.
|
5560
|
+
*
|
5561
|
+
* a, (b, *) = 1, 2, 3, 4
|
5562
|
+
* ^
|
5563
|
+
*
|
5564
|
+
* If the `*` is omitted, this field will contain an `ImplicitRestNode`
|
5565
|
+
*
|
5566
|
+
* a, (b,) = 1, 2, 3, 4
|
5567
|
+
* ^
|
4700
5568
|
*/
|
4701
5569
|
struct pm_node *rest;
|
4702
5570
|
|
4703
5571
|
/**
|
4704
5572
|
* MultiTargetNode#rights
|
5573
|
+
*
|
5574
|
+
* Represents the targets expressions after a splat node.
|
5575
|
+
*
|
5576
|
+
* a, (*, b, c) = 1, 2, 3, 4, 5
|
5577
|
+
* ^^^^
|
4705
5578
|
*/
|
4706
5579
|
struct pm_node_list rights;
|
4707
5580
|
|
4708
5581
|
/**
|
4709
5582
|
* MultiTargetNode#lparen_loc
|
5583
|
+
*
|
5584
|
+
* The location of the opening parenthesis.
|
5585
|
+
*
|
5586
|
+
* a, (b, c) = 1, 2, 3
|
5587
|
+
* ^
|
4710
5588
|
*/
|
4711
5589
|
pm_location_t lparen_loc;
|
4712
5590
|
|
4713
5591
|
/**
|
4714
5592
|
* MultiTargetNode#rparen_loc
|
5593
|
+
*
|
5594
|
+
* The location of the closing parenthesis.
|
5595
|
+
*
|
5596
|
+
* a, (b, c) = 1, 2, 3
|
5597
|
+
* ^
|
4715
5598
|
*/
|
4716
5599
|
pm_location_t rparen_loc;
|
4717
5600
|
} pm_multi_target_node_t;
|
@@ -4719,7 +5602,12 @@ typedef struct pm_multi_target_node {
|
|
4719
5602
|
/**
|
4720
5603
|
* MultiWriteNode
|
4721
5604
|
*
|
4722
|
-
*
|
5605
|
+
* Represents a write to a multi-target expression.
|
5606
|
+
*
|
5607
|
+
* a, b, c = 1, 2, 3
|
5608
|
+
* ^^^^^^^^^^^^^^^^^
|
5609
|
+
*
|
5610
|
+
* Type: ::PM_MULTI_WRITE_NODE
|
4723
5611
|
*
|
4724
5612
|
* @extends pm_node_t
|
4725
5613
|
*/
|
@@ -4727,38 +5615,89 @@ typedef struct pm_multi_write_node {
|
|
4727
5615
|
/** The embedded base node. */
|
4728
5616
|
pm_node_t base;
|
4729
5617
|
|
5618
|
+
|
4730
5619
|
/**
|
4731
5620
|
* MultiWriteNode#lefts
|
5621
|
+
*
|
5622
|
+
* Represents the targets expressions before a splat node.
|
5623
|
+
*
|
5624
|
+
* a, b, * = 1, 2, 3, 4, 5
|
5625
|
+
* ^^^^
|
5626
|
+
*
|
5627
|
+
* The splat node can be absent, in that case all target expressions are in the left field.
|
5628
|
+
*
|
5629
|
+
* a, b, c = 1, 2, 3, 4, 5
|
5630
|
+
* ^^^^^^^
|
4732
5631
|
*/
|
4733
5632
|
struct pm_node_list lefts;
|
4734
5633
|
|
4735
5634
|
/**
|
4736
5635
|
* MultiWriteNode#rest
|
5636
|
+
*
|
5637
|
+
* Represents a splat node in the target expression.
|
5638
|
+
*
|
5639
|
+
* a, b, *c = 1, 2, 3, 4
|
5640
|
+
* ^^
|
5641
|
+
*
|
5642
|
+
* The variable can be empty, this results in a `SplatNode` with a `nil` expression field.
|
5643
|
+
*
|
5644
|
+
* a, b, * = 1, 2, 3, 4
|
5645
|
+
* ^
|
5646
|
+
*
|
5647
|
+
* If the `*` is omitted, this field will contain an `ImplicitRestNode`
|
5648
|
+
*
|
5649
|
+
* a, b, = 1, 2, 3, 4
|
5650
|
+
* ^
|
4737
5651
|
*/
|
4738
5652
|
struct pm_node *rest;
|
4739
5653
|
|
4740
5654
|
/**
|
4741
5655
|
* MultiWriteNode#rights
|
5656
|
+
*
|
5657
|
+
* Represents the targets expressions after a splat node.
|
5658
|
+
*
|
5659
|
+
* a, *, b, c = 1, 2, 3, 4, 5
|
5660
|
+
* ^^^^
|
4742
5661
|
*/
|
4743
5662
|
struct pm_node_list rights;
|
4744
5663
|
|
4745
5664
|
/**
|
4746
5665
|
* MultiWriteNode#lparen_loc
|
5666
|
+
*
|
5667
|
+
* The location of the opening parenthesis.
|
5668
|
+
*
|
5669
|
+
* (a, b, c) = 1, 2, 3
|
5670
|
+
* ^
|
4747
5671
|
*/
|
4748
5672
|
pm_location_t lparen_loc;
|
4749
5673
|
|
4750
5674
|
/**
|
4751
5675
|
* MultiWriteNode#rparen_loc
|
5676
|
+
*
|
5677
|
+
* The location of the closing parenthesis.
|
5678
|
+
*
|
5679
|
+
* (a, b, c) = 1, 2, 3
|
5680
|
+
* ^
|
4752
5681
|
*/
|
4753
5682
|
pm_location_t rparen_loc;
|
4754
5683
|
|
4755
5684
|
/**
|
4756
5685
|
* MultiWriteNode#operator_loc
|
5686
|
+
*
|
5687
|
+
* The location of the operator.
|
5688
|
+
*
|
5689
|
+
* a, b, c = 1, 2, 3
|
5690
|
+
* ^
|
4757
5691
|
*/
|
4758
5692
|
pm_location_t operator_loc;
|
4759
5693
|
|
4760
5694
|
/**
|
4761
5695
|
* MultiWriteNode#value
|
5696
|
+
*
|
5697
|
+
* The value to write to the targets. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
|
5698
|
+
*
|
5699
|
+
* a, b, c = 1, 2, 3
|
5700
|
+
* ^^^^^^^
|
4762
5701
|
*/
|
4763
5702
|
struct pm_node *value;
|
4764
5703
|
} pm_multi_write_node_t;
|
@@ -4766,7 +5705,12 @@ typedef struct pm_multi_write_node {
|
|
4766
5705
|
/**
|
4767
5706
|
* NextNode
|
4768
5707
|
*
|
4769
|
-
*
|
5708
|
+
* Represents the use of the `next` keyword.
|
5709
|
+
*
|
5710
|
+
* next 1
|
5711
|
+
* ^^^^^^
|
5712
|
+
*
|
5713
|
+
* Type: ::PM_NEXT_NODE
|
4770
5714
|
*
|
4771
5715
|
* @extends pm_node_t
|
4772
5716
|
*/
|
@@ -4774,6 +5718,7 @@ typedef struct pm_next_node {
|
|
4774
5718
|
/** The embedded base node. */
|
4775
5719
|
pm_node_t base;
|
4776
5720
|
|
5721
|
+
|
4777
5722
|
/**
|
4778
5723
|
* NextNode#arguments
|
4779
5724
|
*/
|
@@ -4788,19 +5733,31 @@ typedef struct pm_next_node {
|
|
4788
5733
|
/**
|
4789
5734
|
* NilNode
|
4790
5735
|
*
|
4791
|
-
*
|
5736
|
+
* Represents the use of the `nil` keyword.
|
5737
|
+
*
|
5738
|
+
* nil
|
5739
|
+
* ^^^
|
5740
|
+
*
|
5741
|
+
* Type: ::PM_NIL_NODE
|
4792
5742
|
*
|
4793
5743
|
* @extends pm_node_t
|
4794
5744
|
*/
|
4795
5745
|
typedef struct pm_nil_node {
|
4796
5746
|
/** The embedded base node. */
|
4797
5747
|
pm_node_t base;
|
5748
|
+
|
4798
5749
|
} pm_nil_node_t;
|
4799
5750
|
|
4800
5751
|
/**
|
4801
5752
|
* NoKeywordsParameterNode
|
4802
5753
|
*
|
4803
|
-
*
|
5754
|
+
* Represents the use of `**nil` inside method arguments.
|
5755
|
+
*
|
5756
|
+
* def a(**nil)
|
5757
|
+
* ^^^^^
|
5758
|
+
* end
|
5759
|
+
*
|
5760
|
+
* Type: ::PM_NO_KEYWORDS_PARAMETER_NODE
|
4804
5761
|
*
|
4805
5762
|
* @extends pm_node_t
|
4806
5763
|
*/
|
@@ -4808,6 +5765,7 @@ typedef struct pm_no_keywords_parameter_node {
|
|
4808
5765
|
/** The embedded base node. */
|
4809
5766
|
pm_node_t base;
|
4810
5767
|
|
5768
|
+
|
4811
5769
|
/**
|
4812
5770
|
* NoKeywordsParameterNode#operator_loc
|
4813
5771
|
*/
|
@@ -4822,7 +5780,12 @@ typedef struct pm_no_keywords_parameter_node {
|
|
4822
5780
|
/**
|
4823
5781
|
* NumberedParametersNode
|
4824
5782
|
*
|
4825
|
-
*
|
5783
|
+
* Represents an implicit set of parameters through the use of numbered parameters within a block or lambda.
|
5784
|
+
*
|
5785
|
+
* -> { _1 + _2 }
|
5786
|
+
* ^^^^^^^^^^^^^^
|
5787
|
+
*
|
5788
|
+
* Type: ::PM_NUMBERED_PARAMETERS_NODE
|
4826
5789
|
*
|
4827
5790
|
* @extends pm_node_t
|
4828
5791
|
*/
|
@@ -4830,6 +5793,7 @@ typedef struct pm_numbered_parameters_node {
|
|
4830
5793
|
/** The embedded base node. */
|
4831
5794
|
pm_node_t base;
|
4832
5795
|
|
5796
|
+
|
4833
5797
|
/**
|
4834
5798
|
* NumberedParametersNode#maximum
|
4835
5799
|
*/
|
@@ -4839,7 +5803,12 @@ typedef struct pm_numbered_parameters_node {
|
|
4839
5803
|
/**
|
4840
5804
|
* NumberedReferenceReadNode
|
4841
5805
|
*
|
4842
|
-
*
|
5806
|
+
* Represents reading a numbered reference to a capture in the previous match.
|
5807
|
+
*
|
5808
|
+
* $1
|
5809
|
+
* ^^
|
5810
|
+
*
|
5811
|
+
* Type: ::PM_NUMBERED_REFERENCE_READ_NODE
|
4843
5812
|
*
|
4844
5813
|
* @extends pm_node_t
|
4845
5814
|
*/
|
@@ -4847,6 +5816,7 @@ typedef struct pm_numbered_reference_read_node {
|
|
4847
5816
|
/** The embedded base node. */
|
4848
5817
|
pm_node_t base;
|
4849
5818
|
|
5819
|
+
|
4850
5820
|
/**
|
4851
5821
|
* NumberedReferenceReadNode#number
|
4852
5822
|
*
|
@@ -4864,9 +5834,16 @@ typedef struct pm_numbered_reference_read_node {
|
|
4864
5834
|
/**
|
4865
5835
|
* OptionalKeywordParameterNode
|
4866
5836
|
*
|
4867
|
-
*
|
4868
|
-
*
|
4869
|
-
*
|
5837
|
+
* Represents an optional keyword parameter to a method, block, or lambda definition.
|
5838
|
+
*
|
5839
|
+
* def a(b: 1)
|
5840
|
+
* ^^^^
|
5841
|
+
* end
|
5842
|
+
*
|
5843
|
+
* Type: ::PM_OPTIONAL_KEYWORD_PARAMETER_NODE
|
5844
|
+
|
5845
|
+
* Flags (#pm_parameter_flags):
|
5846
|
+
* * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER
|
4870
5847
|
*
|
4871
5848
|
* @extends pm_node_t
|
4872
5849
|
*/
|
@@ -4874,6 +5851,7 @@ typedef struct pm_optional_keyword_parameter_node {
|
|
4874
5851
|
/** The embedded base node. */
|
4875
5852
|
pm_node_t base;
|
4876
5853
|
|
5854
|
+
|
4877
5855
|
/**
|
4878
5856
|
* OptionalKeywordParameterNode#name
|
4879
5857
|
*/
|
@@ -4893,9 +5871,16 @@ typedef struct pm_optional_keyword_parameter_node {
|
|
4893
5871
|
/**
|
4894
5872
|
* OptionalParameterNode
|
4895
5873
|
*
|
4896
|
-
*
|
4897
|
-
*
|
4898
|
-
*
|
5874
|
+
* Represents an optional parameter to a method, block, or lambda definition.
|
5875
|
+
*
|
5876
|
+
* def a(b = 1)
|
5877
|
+
* ^^^^^
|
5878
|
+
* end
|
5879
|
+
*
|
5880
|
+
* Type: ::PM_OPTIONAL_PARAMETER_NODE
|
5881
|
+
|
5882
|
+
* Flags (#pm_parameter_flags):
|
5883
|
+
* * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER
|
4899
5884
|
*
|
4900
5885
|
* @extends pm_node_t
|
4901
5886
|
*/
|
@@ -4903,6 +5888,7 @@ typedef struct pm_optional_parameter_node {
|
|
4903
5888
|
/** The embedded base node. */
|
4904
5889
|
pm_node_t base;
|
4905
5890
|
|
5891
|
+
|
4906
5892
|
/**
|
4907
5893
|
* OptionalParameterNode#name
|
4908
5894
|
*/
|
@@ -4927,7 +5913,12 @@ typedef struct pm_optional_parameter_node {
|
|
4927
5913
|
/**
|
4928
5914
|
* OrNode
|
4929
5915
|
*
|
4930
|
-
*
|
5916
|
+
* Represents the use of the `||` operator or the `or` keyword.
|
5917
|
+
*
|
5918
|
+
* left or right
|
5919
|
+
* ^^^^^^^^^^^^^
|
5920
|
+
*
|
5921
|
+
* Type: ::PM_OR_NODE
|
4931
5922
|
*
|
4932
5923
|
* @extends pm_node_t
|
4933
5924
|
*/
|
@@ -4935,6 +5926,7 @@ typedef struct pm_or_node {
|
|
4935
5926
|
/** The embedded base node. */
|
4936
5927
|
pm_node_t base;
|
4937
5928
|
|
5929
|
+
|
4938
5930
|
/**
|
4939
5931
|
* OrNode#left
|
4940
5932
|
*
|
@@ -4951,7 +5943,7 @@ typedef struct pm_or_node {
|
|
4951
5943
|
/**
|
4952
5944
|
* OrNode#right
|
4953
5945
|
*
|
4954
|
-
* Represents the right side of the expression.
|
5946
|
+
* Represents the right side of the expression.
|
4955
5947
|
*
|
4956
5948
|
* left || right
|
4957
5949
|
* ^^^^^
|
@@ -4975,7 +5967,13 @@ typedef struct pm_or_node {
|
|
4975
5967
|
/**
|
4976
5968
|
* ParametersNode
|
4977
5969
|
*
|
4978
|
-
*
|
5970
|
+
* Represents the list of parameters on a method, block, or lambda definition.
|
5971
|
+
*
|
5972
|
+
* def a(b, c, d)
|
5973
|
+
* ^^^^^^^
|
5974
|
+
* end
|
5975
|
+
*
|
5976
|
+
* Type: ::PM_PARAMETERS_NODE
|
4979
5977
|
*
|
4980
5978
|
* @extends pm_node_t
|
4981
5979
|
*/
|
@@ -4983,6 +5981,7 @@ typedef struct pm_parameters_node {
|
|
4983
5981
|
/** The embedded base node. */
|
4984
5982
|
pm_node_t base;
|
4985
5983
|
|
5984
|
+
|
4986
5985
|
/**
|
4987
5986
|
* ParametersNode#requireds
|
4988
5987
|
*/
|
@@ -5022,7 +6021,12 @@ typedef struct pm_parameters_node {
|
|
5022
6021
|
/**
|
5023
6022
|
* ParenthesesNode
|
5024
6023
|
*
|
5025
|
-
*
|
6024
|
+
* Represents a parenthesized expression
|
6025
|
+
*
|
6026
|
+
* (10 + 34)
|
6027
|
+
* ^^^^^^^^^
|
6028
|
+
*
|
6029
|
+
* Type: ::PM_PARENTHESES_NODE
|
5026
6030
|
*
|
5027
6031
|
* @extends pm_node_t
|
5028
6032
|
*/
|
@@ -5030,6 +6034,7 @@ typedef struct pm_parentheses_node {
|
|
5030
6034
|
/** The embedded base node. */
|
5031
6035
|
pm_node_t base;
|
5032
6036
|
|
6037
|
+
|
5033
6038
|
/**
|
5034
6039
|
* ParenthesesNode#body
|
5035
6040
|
*/
|
@@ -5049,7 +6054,12 @@ typedef struct pm_parentheses_node {
|
|
5049
6054
|
/**
|
5050
6055
|
* PinnedExpressionNode
|
5051
6056
|
*
|
5052
|
-
*
|
6057
|
+
* Represents the use of the `^` operator for pinning an expression in a pattern matching expression.
|
6058
|
+
*
|
6059
|
+
* foo in ^(bar)
|
6060
|
+
* ^^^^^^
|
6061
|
+
*
|
6062
|
+
* Type: ::PM_PINNED_EXPRESSION_NODE
|
5053
6063
|
*
|
5054
6064
|
* @extends pm_node_t
|
5055
6065
|
*/
|
@@ -5057,6 +6067,7 @@ typedef struct pm_pinned_expression_node {
|
|
5057
6067
|
/** The embedded base node. */
|
5058
6068
|
pm_node_t base;
|
5059
6069
|
|
6070
|
+
|
5060
6071
|
/**
|
5061
6072
|
* PinnedExpressionNode#expression
|
5062
6073
|
*/
|
@@ -5081,7 +6092,12 @@ typedef struct pm_pinned_expression_node {
|
|
5081
6092
|
/**
|
5082
6093
|
* PinnedVariableNode
|
5083
6094
|
*
|
5084
|
-
*
|
6095
|
+
* Represents the use of the `^` operator for pinning a variable in a pattern matching expression.
|
6096
|
+
*
|
6097
|
+
* foo in ^bar
|
6098
|
+
* ^^^^
|
6099
|
+
*
|
6100
|
+
* Type: ::PM_PINNED_VARIABLE_NODE
|
5085
6101
|
*
|
5086
6102
|
* @extends pm_node_t
|
5087
6103
|
*/
|
@@ -5089,6 +6105,7 @@ typedef struct pm_pinned_variable_node {
|
|
5089
6105
|
/** The embedded base node. */
|
5090
6106
|
pm_node_t base;
|
5091
6107
|
|
6108
|
+
|
5092
6109
|
/**
|
5093
6110
|
* PinnedVariableNode#variable
|
5094
6111
|
*/
|
@@ -5103,7 +6120,12 @@ typedef struct pm_pinned_variable_node {
|
|
5103
6120
|
/**
|
5104
6121
|
* PostExecutionNode
|
5105
6122
|
*
|
5106
|
-
*
|
6123
|
+
* Represents the use of the `END` keyword.
|
6124
|
+
*
|
6125
|
+
* END { foo }
|
6126
|
+
* ^^^^^^^^^^^
|
6127
|
+
*
|
6128
|
+
* Type: ::PM_POST_EXECUTION_NODE
|
5107
6129
|
*
|
5108
6130
|
* @extends pm_node_t
|
5109
6131
|
*/
|
@@ -5111,6 +6133,7 @@ typedef struct pm_post_execution_node {
|
|
5111
6133
|
/** The embedded base node. */
|
5112
6134
|
pm_node_t base;
|
5113
6135
|
|
6136
|
+
|
5114
6137
|
/**
|
5115
6138
|
* PostExecutionNode#statements
|
5116
6139
|
*/
|
@@ -5135,7 +6158,12 @@ typedef struct pm_post_execution_node {
|
|
5135
6158
|
/**
|
5136
6159
|
* PreExecutionNode
|
5137
6160
|
*
|
5138
|
-
*
|
6161
|
+
* Represents the use of the `BEGIN` keyword.
|
6162
|
+
*
|
6163
|
+
* BEGIN { foo }
|
6164
|
+
* ^^^^^^^^^^^^^
|
6165
|
+
*
|
6166
|
+
* Type: ::PM_PRE_EXECUTION_NODE
|
5139
6167
|
*
|
5140
6168
|
* @extends pm_node_t
|
5141
6169
|
*/
|
@@ -5143,6 +6171,7 @@ typedef struct pm_pre_execution_node {
|
|
5143
6171
|
/** The embedded base node. */
|
5144
6172
|
pm_node_t base;
|
5145
6173
|
|
6174
|
+
|
5146
6175
|
/**
|
5147
6176
|
* PreExecutionNode#statements
|
5148
6177
|
*/
|
@@ -5167,7 +6196,9 @@ typedef struct pm_pre_execution_node {
|
|
5167
6196
|
/**
|
5168
6197
|
* ProgramNode
|
5169
6198
|
*
|
5170
|
-
*
|
6199
|
+
* The top level node of any parse tree.
|
6200
|
+
*
|
6201
|
+
* Type: ::PM_PROGRAM_NODE
|
5171
6202
|
*
|
5172
6203
|
* @extends pm_node_t
|
5173
6204
|
*/
|
@@ -5175,6 +6206,7 @@ typedef struct pm_program_node {
|
|
5175
6206
|
/** The embedded base node. */
|
5176
6207
|
pm_node_t base;
|
5177
6208
|
|
6209
|
+
|
5178
6210
|
/**
|
5179
6211
|
* ProgramNode#locals
|
5180
6212
|
*/
|
@@ -5189,9 +6221,18 @@ typedef struct pm_program_node {
|
|
5189
6221
|
/**
|
5190
6222
|
* RangeNode
|
5191
6223
|
*
|
5192
|
-
*
|
5193
|
-
*
|
5194
|
-
*
|
6224
|
+
* Represents the use of the `..` or `...` operators.
|
6225
|
+
*
|
6226
|
+
* 1..2
|
6227
|
+
* ^^^^
|
6228
|
+
*
|
6229
|
+
* c if a =~ /left/ ... b =~ /right/
|
6230
|
+
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
6231
|
+
*
|
6232
|
+
* Type: ::PM_RANGE_NODE
|
6233
|
+
|
6234
|
+
* Flags (#pm_range_flags):
|
6235
|
+
* * ::PM_RANGE_FLAGS_EXCLUDE_END
|
5195
6236
|
*
|
5196
6237
|
* @extends pm_node_t
|
5197
6238
|
*/
|
@@ -5199,6 +6240,7 @@ typedef struct pm_range_node {
|
|
5199
6240
|
/** The embedded base node. */
|
5200
6241
|
pm_node_t base;
|
5201
6242
|
|
6243
|
+
|
5202
6244
|
/**
|
5203
6245
|
* RangeNode#left
|
5204
6246
|
*
|
@@ -5237,7 +6279,18 @@ typedef struct pm_range_node {
|
|
5237
6279
|
/**
|
5238
6280
|
* RationalNode
|
5239
6281
|
*
|
5240
|
-
*
|
6282
|
+
* Represents a rational number literal.
|
6283
|
+
*
|
6284
|
+
* 1.0r
|
6285
|
+
* ^^^^
|
6286
|
+
*
|
6287
|
+
* Type: ::PM_RATIONAL_NODE
|
6288
|
+
|
6289
|
+
* Flags (#pm_integer_base_flags):
|
6290
|
+
* * ::PM_INTEGER_BASE_FLAGS_BINARY
|
6291
|
+
* * ::PM_INTEGER_BASE_FLAGS_DECIMAL
|
6292
|
+
* * ::PM_INTEGER_BASE_FLAGS_OCTAL
|
6293
|
+
* * ::PM_INTEGER_BASE_FLAGS_HEXADECIMAL
|
5241
6294
|
*
|
5242
6295
|
* @extends pm_node_t
|
5243
6296
|
*/
|
@@ -5245,40 +6298,66 @@ typedef struct pm_rational_node {
|
|
5245
6298
|
/** The embedded base node. */
|
5246
6299
|
pm_node_t base;
|
5247
6300
|
|
6301
|
+
|
5248
6302
|
/**
|
5249
|
-
* RationalNode#
|
6303
|
+
* RationalNode#numerator
|
6304
|
+
*
|
6305
|
+
* The numerator of the rational number.
|
6306
|
+
*
|
6307
|
+
* 1.5r # numerator 3
|
5250
6308
|
*/
|
5251
|
-
|
6309
|
+
pm_integer_t numerator;
|
6310
|
+
|
6311
|
+
/**
|
6312
|
+
* RationalNode#denominator
|
6313
|
+
*
|
6314
|
+
* The denominator of the rational number.
|
6315
|
+
*
|
6316
|
+
* 1.5r # denominator 2
|
6317
|
+
*/
|
6318
|
+
pm_integer_t denominator;
|
5252
6319
|
} pm_rational_node_t;
|
5253
6320
|
|
5254
6321
|
/**
|
5255
6322
|
* RedoNode
|
5256
6323
|
*
|
5257
|
-
*
|
6324
|
+
* Represents the use of the `redo` keyword.
|
6325
|
+
*
|
6326
|
+
* redo
|
6327
|
+
* ^^^^
|
6328
|
+
*
|
6329
|
+
* Type: ::PM_REDO_NODE
|
5258
6330
|
*
|
5259
6331
|
* @extends pm_node_t
|
5260
6332
|
*/
|
5261
6333
|
typedef struct pm_redo_node {
|
5262
6334
|
/** The embedded base node. */
|
5263
6335
|
pm_node_t base;
|
6336
|
+
|
5264
6337
|
} pm_redo_node_t;
|
5265
6338
|
|
5266
6339
|
/**
|
5267
6340
|
* RegularExpressionNode
|
5268
6341
|
*
|
5269
|
-
*
|
5270
|
-
*
|
5271
|
-
*
|
5272
|
-
*
|
5273
|
-
*
|
5274
|
-
*
|
5275
|
-
|
5276
|
-
*
|
5277
|
-
*
|
5278
|
-
*
|
5279
|
-
*
|
5280
|
-
*
|
5281
|
-
*
|
6342
|
+
* Represents a regular expression literal with no interpolation.
|
6343
|
+
*
|
6344
|
+
* /foo/i
|
6345
|
+
* ^^^^^^
|
6346
|
+
*
|
6347
|
+
* Type: ::PM_REGULAR_EXPRESSION_NODE
|
6348
|
+
|
6349
|
+
* Flags (#pm_regular_expression_flags):
|
6350
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE
|
6351
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_EXTENDED
|
6352
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE
|
6353
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_ONCE
|
6354
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_EUC_JP
|
6355
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT
|
6356
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J
|
6357
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_UTF_8
|
6358
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING
|
6359
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING
|
6360
|
+
* * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING
|
5282
6361
|
*
|
5283
6362
|
* @extends pm_node_t
|
5284
6363
|
*/
|
@@ -5286,6 +6365,7 @@ typedef struct pm_regular_expression_node {
|
|
5286
6365
|
/** The embedded base node. */
|
5287
6366
|
pm_node_t base;
|
5288
6367
|
|
6368
|
+
|
5289
6369
|
/**
|
5290
6370
|
* RegularExpressionNode#opening_loc
|
5291
6371
|
*/
|
@@ -5310,9 +6390,16 @@ typedef struct pm_regular_expression_node {
|
|
5310
6390
|
/**
|
5311
6391
|
* RequiredKeywordParameterNode
|
5312
6392
|
*
|
5313
|
-
*
|
5314
|
-
*
|
5315
|
-
*
|
6393
|
+
* Represents a required keyword parameter to a method, block, or lambda definition.
|
6394
|
+
*
|
6395
|
+
* def a(b: )
|
6396
|
+
* ^^
|
6397
|
+
* end
|
6398
|
+
*
|
6399
|
+
* Type: ::PM_REQUIRED_KEYWORD_PARAMETER_NODE
|
6400
|
+
|
6401
|
+
* Flags (#pm_parameter_flags):
|
6402
|
+
* * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER
|
5316
6403
|
*
|
5317
6404
|
* @extends pm_node_t
|
5318
6405
|
*/
|
@@ -5320,6 +6407,7 @@ typedef struct pm_required_keyword_parameter_node {
|
|
5320
6407
|
/** The embedded base node. */
|
5321
6408
|
pm_node_t base;
|
5322
6409
|
|
6410
|
+
|
5323
6411
|
/**
|
5324
6412
|
* RequiredKeywordParameterNode#name
|
5325
6413
|
*/
|
@@ -5334,9 +6422,16 @@ typedef struct pm_required_keyword_parameter_node {
|
|
5334
6422
|
/**
|
5335
6423
|
* RequiredParameterNode
|
5336
6424
|
*
|
5337
|
-
*
|
5338
|
-
*
|
5339
|
-
*
|
6425
|
+
* Represents a required parameter to a method, block, or lambda definition.
|
6426
|
+
*
|
6427
|
+
* def a(b)
|
6428
|
+
* ^
|
6429
|
+
* end
|
6430
|
+
*
|
6431
|
+
* Type: ::PM_REQUIRED_PARAMETER_NODE
|
6432
|
+
|
6433
|
+
* Flags (#pm_parameter_flags):
|
6434
|
+
* * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER
|
5340
6435
|
*
|
5341
6436
|
* @extends pm_node_t
|
5342
6437
|
*/
|
@@ -5344,6 +6439,7 @@ typedef struct pm_required_parameter_node {
|
|
5344
6439
|
/** The embedded base node. */
|
5345
6440
|
pm_node_t base;
|
5346
6441
|
|
6442
|
+
|
5347
6443
|
/**
|
5348
6444
|
* RequiredParameterNode#name
|
5349
6445
|
*/
|
@@ -5353,7 +6449,12 @@ typedef struct pm_required_parameter_node {
|
|
5353
6449
|
/**
|
5354
6450
|
* RescueModifierNode
|
5355
6451
|
*
|
5356
|
-
*
|
6452
|
+
* Represents an expression modified with a rescue.
|
6453
|
+
*
|
6454
|
+
* foo rescue nil
|
6455
|
+
* ^^^^^^^^^^^^^^
|
6456
|
+
*
|
6457
|
+
* Type: ::PM_RESCUE_MODIFIER_NODE
|
5357
6458
|
*
|
5358
6459
|
* @extends pm_node_t
|
5359
6460
|
*/
|
@@ -5361,6 +6462,7 @@ typedef struct pm_rescue_modifier_node {
|
|
5361
6462
|
/** The embedded base node. */
|
5362
6463
|
pm_node_t base;
|
5363
6464
|
|
6465
|
+
|
5364
6466
|
/**
|
5365
6467
|
* RescueModifierNode#expression
|
5366
6468
|
*/
|
@@ -5380,7 +6482,17 @@ typedef struct pm_rescue_modifier_node {
|
|
5380
6482
|
/**
|
5381
6483
|
* RescueNode
|
5382
6484
|
*
|
5383
|
-
*
|
6485
|
+
* Represents a rescue statement.
|
6486
|
+
*
|
6487
|
+
* begin
|
6488
|
+
* rescue Foo, *splat, Bar => ex
|
6489
|
+
* foo
|
6490
|
+
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
6491
|
+
* end
|
6492
|
+
*
|
6493
|
+
* `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `exception` field.
|
6494
|
+
*
|
6495
|
+
* Type: ::PM_RESCUE_NODE
|
5384
6496
|
*
|
5385
6497
|
* @extends pm_node_t
|
5386
6498
|
*/
|
@@ -5388,6 +6500,7 @@ typedef struct pm_rescue_node {
|
|
5388
6500
|
/** The embedded base node. */
|
5389
6501
|
pm_node_t base;
|
5390
6502
|
|
6503
|
+
|
5391
6504
|
/**
|
5392
6505
|
* RescueNode#keyword_loc
|
5393
6506
|
*/
|
@@ -5414,17 +6527,24 @@ typedef struct pm_rescue_node {
|
|
5414
6527
|
struct pm_statements_node *statements;
|
5415
6528
|
|
5416
6529
|
/**
|
5417
|
-
* RescueNode#
|
6530
|
+
* RescueNode#subsequent
|
5418
6531
|
*/
|
5419
|
-
struct pm_rescue_node *
|
6532
|
+
struct pm_rescue_node *subsequent;
|
5420
6533
|
} pm_rescue_node_t;
|
5421
6534
|
|
5422
6535
|
/**
|
5423
6536
|
* RestParameterNode
|
5424
6537
|
*
|
5425
|
-
*
|
5426
|
-
*
|
5427
|
-
*
|
6538
|
+
* Represents a rest parameter to a method, block, or lambda definition.
|
6539
|
+
*
|
6540
|
+
* def a(*b)
|
6541
|
+
* ^^
|
6542
|
+
* end
|
6543
|
+
*
|
6544
|
+
* Type: ::PM_REST_PARAMETER_NODE
|
6545
|
+
|
6546
|
+
* Flags (#pm_parameter_flags):
|
6547
|
+
* * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER
|
5428
6548
|
*
|
5429
6549
|
* @extends pm_node_t
|
5430
6550
|
*/
|
@@ -5432,6 +6552,7 @@ typedef struct pm_rest_parameter_node {
|
|
5432
6552
|
/** The embedded base node. */
|
5433
6553
|
pm_node_t base;
|
5434
6554
|
|
6555
|
+
|
5435
6556
|
/**
|
5436
6557
|
* RestParameterNode#name
|
5437
6558
|
*/
|
@@ -5451,21 +6572,30 @@ typedef struct pm_rest_parameter_node {
|
|
5451
6572
|
/**
|
5452
6573
|
* RetryNode
|
5453
6574
|
*
|
5454
|
-
*
|
6575
|
+
* Represents the use of the `retry` keyword.
|
6576
|
+
*
|
6577
|
+
* retry
|
6578
|
+
* ^^^^^
|
6579
|
+
*
|
6580
|
+
* Type: ::PM_RETRY_NODE
|
5455
6581
|
*
|
5456
6582
|
* @extends pm_node_t
|
5457
6583
|
*/
|
5458
6584
|
typedef struct pm_retry_node {
|
5459
6585
|
/** The embedded base node. */
|
5460
6586
|
pm_node_t base;
|
6587
|
+
|
5461
6588
|
} pm_retry_node_t;
|
5462
6589
|
|
5463
6590
|
/**
|
5464
6591
|
* ReturnNode
|
5465
6592
|
*
|
5466
|
-
*
|
5467
|
-
*
|
5468
|
-
*
|
6593
|
+
* Represents the use of the `return` keyword.
|
6594
|
+
*
|
6595
|
+
* return 1
|
6596
|
+
* ^^^^^^^^
|
6597
|
+
*
|
6598
|
+
* Type: ::PM_RETURN_NODE
|
5469
6599
|
*
|
5470
6600
|
* @extends pm_node_t
|
5471
6601
|
*/
|
@@ -5473,6 +6603,7 @@ typedef struct pm_return_node {
|
|
5473
6603
|
/** The embedded base node. */
|
5474
6604
|
pm_node_t base;
|
5475
6605
|
|
6606
|
+
|
5476
6607
|
/**
|
5477
6608
|
* ReturnNode#keyword_loc
|
5478
6609
|
*/
|
@@ -5487,23 +6618,36 @@ typedef struct pm_return_node {
|
|
5487
6618
|
/**
|
5488
6619
|
* SelfNode
|
5489
6620
|
*
|
5490
|
-
*
|
6621
|
+
* Represents the `self` keyword.
|
6622
|
+
*
|
6623
|
+
* self
|
6624
|
+
* ^^^^
|
6625
|
+
*
|
6626
|
+
* Type: ::PM_SELF_NODE
|
5491
6627
|
*
|
5492
6628
|
* @extends pm_node_t
|
5493
6629
|
*/
|
5494
6630
|
typedef struct pm_self_node {
|
5495
6631
|
/** The embedded base node. */
|
5496
6632
|
pm_node_t base;
|
6633
|
+
|
5497
6634
|
} pm_self_node_t;
|
5498
6635
|
|
5499
6636
|
/**
|
5500
6637
|
* ShareableConstantNode
|
5501
6638
|
*
|
5502
|
-
*
|
5503
|
-
*
|
5504
|
-
*
|
5505
|
-
*
|
5506
|
-
*
|
6639
|
+
* This node wraps a constant write to indicate that when the value is written, it should have its shareability state modified.
|
6640
|
+
*
|
6641
|
+
* # shareable_constant_value: literal
|
6642
|
+
* C = { a: 1 }
|
6643
|
+
* ^^^^^^^^^^^^
|
6644
|
+
*
|
6645
|
+
* Type: ::PM_SHAREABLE_CONSTANT_NODE
|
6646
|
+
|
6647
|
+
* Flags (#pm_shareable_constant_node_flags):
|
6648
|
+
* * ::PM_SHAREABLE_CONSTANT_NODE_FLAGS_LITERAL
|
6649
|
+
* * ::PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_EVERYTHING
|
6650
|
+
* * ::PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_COPY
|
5507
6651
|
*
|
5508
6652
|
* @extends pm_node_t
|
5509
6653
|
*/
|
@@ -5511,6 +6655,7 @@ typedef struct pm_shareable_constant_node {
|
|
5511
6655
|
/** The embedded base node. */
|
5512
6656
|
pm_node_t base;
|
5513
6657
|
|
6658
|
+
|
5514
6659
|
/**
|
5515
6660
|
* ShareableConstantNode#write
|
5516
6661
|
*
|
@@ -5522,7 +6667,12 @@ typedef struct pm_shareable_constant_node {
|
|
5522
6667
|
/**
|
5523
6668
|
* SingletonClassNode
|
5524
6669
|
*
|
5525
|
-
*
|
6670
|
+
* Represents a singleton class declaration involving the `class` keyword.
|
6671
|
+
*
|
6672
|
+
* class << self end
|
6673
|
+
* ^^^^^^^^^^^^^^^^^
|
6674
|
+
*
|
6675
|
+
* Type: ::PM_SINGLETON_CLASS_NODE
|
5526
6676
|
*
|
5527
6677
|
* @extends pm_node_t
|
5528
6678
|
*/
|
@@ -5530,6 +6680,7 @@ typedef struct pm_singleton_class_node {
|
|
5530
6680
|
/** The embedded base node. */
|
5531
6681
|
pm_node_t base;
|
5532
6682
|
|
6683
|
+
|
5533
6684
|
/**
|
5534
6685
|
* SingletonClassNode#locals
|
5535
6686
|
*/
|
@@ -5564,24 +6715,36 @@ typedef struct pm_singleton_class_node {
|
|
5564
6715
|
/**
|
5565
6716
|
* SourceEncodingNode
|
5566
6717
|
*
|
5567
|
-
*
|
6718
|
+
* Represents the use of the `__ENCODING__` keyword.
|
6719
|
+
*
|
6720
|
+
* __ENCODING__
|
6721
|
+
* ^^^^^^^^^^^^
|
6722
|
+
*
|
6723
|
+
* Type: ::PM_SOURCE_ENCODING_NODE
|
5568
6724
|
*
|
5569
6725
|
* @extends pm_node_t
|
5570
6726
|
*/
|
5571
6727
|
typedef struct pm_source_encoding_node {
|
5572
6728
|
/** The embedded base node. */
|
5573
6729
|
pm_node_t base;
|
6730
|
+
|
5574
6731
|
} pm_source_encoding_node_t;
|
5575
6732
|
|
5576
6733
|
/**
|
5577
6734
|
* SourceFileNode
|
5578
6735
|
*
|
5579
|
-
*
|
5580
|
-
*
|
5581
|
-
*
|
5582
|
-
*
|
5583
|
-
*
|
5584
|
-
*
|
6736
|
+
* Represents the use of the `__FILE__` keyword.
|
6737
|
+
*
|
6738
|
+
* __FILE__
|
6739
|
+
* ^^^^^^^^
|
6740
|
+
*
|
6741
|
+
* Type: ::PM_SOURCE_FILE_NODE
|
6742
|
+
|
6743
|
+
* Flags (#pm_string_flags):
|
6744
|
+
* * ::PM_STRING_FLAGS_FORCED_UTF8_ENCODING
|
6745
|
+
* * ::PM_STRING_FLAGS_FORCED_BINARY_ENCODING
|
6746
|
+
* * ::PM_STRING_FLAGS_FROZEN
|
6747
|
+
* * ::PM_STRING_FLAGS_MUTABLE
|
5585
6748
|
*
|
5586
6749
|
* @extends pm_node_t
|
5587
6750
|
*/
|
@@ -5589,6 +6752,7 @@ typedef struct pm_source_file_node {
|
|
5589
6752
|
/** The embedded base node. */
|
5590
6753
|
pm_node_t base;
|
5591
6754
|
|
6755
|
+
|
5592
6756
|
/**
|
5593
6757
|
* SourceFileNode#filepath
|
5594
6758
|
*
|
@@ -5600,19 +6764,30 @@ typedef struct pm_source_file_node {
|
|
5600
6764
|
/**
|
5601
6765
|
* SourceLineNode
|
5602
6766
|
*
|
5603
|
-
*
|
6767
|
+
* Represents the use of the `__LINE__` keyword.
|
6768
|
+
*
|
6769
|
+
* __LINE__
|
6770
|
+
* ^^^^^^^^
|
6771
|
+
*
|
6772
|
+
* Type: ::PM_SOURCE_LINE_NODE
|
5604
6773
|
*
|
5605
6774
|
* @extends pm_node_t
|
5606
6775
|
*/
|
5607
6776
|
typedef struct pm_source_line_node {
|
5608
6777
|
/** The embedded base node. */
|
5609
6778
|
pm_node_t base;
|
6779
|
+
|
5610
6780
|
} pm_source_line_node_t;
|
5611
6781
|
|
5612
6782
|
/**
|
5613
6783
|
* SplatNode
|
5614
6784
|
*
|
5615
|
-
*
|
6785
|
+
* Represents the use of the splat operator.
|
6786
|
+
*
|
6787
|
+
* [*a]
|
6788
|
+
* ^^
|
6789
|
+
*
|
6790
|
+
* Type: ::PM_SPLAT_NODE
|
5616
6791
|
*
|
5617
6792
|
* @extends pm_node_t
|
5618
6793
|
*/
|
@@ -5620,6 +6795,7 @@ typedef struct pm_splat_node {
|
|
5620
6795
|
/** The embedded base node. */
|
5621
6796
|
pm_node_t base;
|
5622
6797
|
|
6798
|
+
|
5623
6799
|
/**
|
5624
6800
|
* SplatNode#operator_loc
|
5625
6801
|
*/
|
@@ -5634,7 +6810,12 @@ typedef struct pm_splat_node {
|
|
5634
6810
|
/**
|
5635
6811
|
* StatementsNode
|
5636
6812
|
*
|
5637
|
-
*
|
6813
|
+
* Represents a set of statements contained within some scope.
|
6814
|
+
*
|
6815
|
+
* foo; bar; baz
|
6816
|
+
* ^^^^^^^^^^^^^
|
6817
|
+
*
|
6818
|
+
* Type: ::PM_STATEMENTS_NODE
|
5638
6819
|
*
|
5639
6820
|
* @extends pm_node_t
|
5640
6821
|
*/
|
@@ -5642,6 +6823,7 @@ typedef struct pm_statements_node {
|
|
5642
6823
|
/** The embedded base node. */
|
5643
6824
|
pm_node_t base;
|
5644
6825
|
|
6826
|
+
|
5645
6827
|
/**
|
5646
6828
|
* StatementsNode#body
|
5647
6829
|
*/
|
@@ -5651,12 +6833,24 @@ typedef struct pm_statements_node {
|
|
5651
6833
|
/**
|
5652
6834
|
* StringNode
|
5653
6835
|
*
|
5654
|
-
*
|
5655
|
-
*
|
5656
|
-
*
|
5657
|
-
*
|
5658
|
-
*
|
5659
|
-
*
|
6836
|
+
* Represents a string literal, a string contained within a `%w` list, or plain string content within an interpolated string.
|
6837
|
+
*
|
6838
|
+
* "foo"
|
6839
|
+
* ^^^^^
|
6840
|
+
*
|
6841
|
+
* %w[foo]
|
6842
|
+
* ^^^
|
6843
|
+
*
|
6844
|
+
* "foo #{bar} baz"
|
6845
|
+
* ^^^^ ^^^^
|
6846
|
+
*
|
6847
|
+
* Type: ::PM_STRING_NODE
|
6848
|
+
|
6849
|
+
* Flags (#pm_string_flags):
|
6850
|
+
* * ::PM_STRING_FLAGS_FORCED_UTF8_ENCODING
|
6851
|
+
* * ::PM_STRING_FLAGS_FORCED_BINARY_ENCODING
|
6852
|
+
* * ::PM_STRING_FLAGS_FROZEN
|
6853
|
+
* * ::PM_STRING_FLAGS_MUTABLE
|
5660
6854
|
*
|
5661
6855
|
* @extends pm_node_t
|
5662
6856
|
*/
|
@@ -5664,6 +6858,7 @@ typedef struct pm_string_node {
|
|
5664
6858
|
/** The embedded base node. */
|
5665
6859
|
pm_node_t base;
|
5666
6860
|
|
6861
|
+
|
5667
6862
|
/**
|
5668
6863
|
* StringNode#opening_loc
|
5669
6864
|
*/
|
@@ -5688,7 +6883,15 @@ typedef struct pm_string_node {
|
|
5688
6883
|
/**
|
5689
6884
|
* SuperNode
|
5690
6885
|
*
|
5691
|
-
*
|
6886
|
+
* Represents the use of the `super` keyword with parentheses or arguments.
|
6887
|
+
*
|
6888
|
+
* super()
|
6889
|
+
* ^^^^^^^
|
6890
|
+
*
|
6891
|
+
* super foo, bar
|
6892
|
+
* ^^^^^^^^^^^^^^
|
6893
|
+
*
|
6894
|
+
* Type: ::PM_SUPER_NODE
|
5692
6895
|
*
|
5693
6896
|
* @extends pm_node_t
|
5694
6897
|
*/
|
@@ -5696,6 +6899,7 @@ typedef struct pm_super_node {
|
|
5696
6899
|
/** The embedded base node. */
|
5697
6900
|
pm_node_t base;
|
5698
6901
|
|
6902
|
+
|
5699
6903
|
/**
|
5700
6904
|
* SuperNode#keyword_loc
|
5701
6905
|
*/
|
@@ -5725,11 +6929,20 @@ typedef struct pm_super_node {
|
|
5725
6929
|
/**
|
5726
6930
|
* SymbolNode
|
5727
6931
|
*
|
5728
|
-
*
|
5729
|
-
*
|
5730
|
-
*
|
5731
|
-
*
|
5732
|
-
*
|
6932
|
+
* Represents a symbol literal or a symbol contained within a `%i` list.
|
6933
|
+
*
|
6934
|
+
* :foo
|
6935
|
+
* ^^^^
|
6936
|
+
*
|
6937
|
+
* %i[foo]
|
6938
|
+
* ^^^
|
6939
|
+
*
|
6940
|
+
* Type: ::PM_SYMBOL_NODE
|
6941
|
+
|
6942
|
+
* Flags (#pm_symbol_flags):
|
6943
|
+
* * ::PM_SYMBOL_FLAGS_FORCED_UTF8_ENCODING
|
6944
|
+
* * ::PM_SYMBOL_FLAGS_FORCED_BINARY_ENCODING
|
6945
|
+
* * ::PM_SYMBOL_FLAGS_FORCED_US_ASCII_ENCODING
|
5733
6946
|
*
|
5734
6947
|
* @extends pm_node_t
|
5735
6948
|
*/
|
@@ -5737,6 +6950,7 @@ typedef struct pm_symbol_node {
|
|
5737
6950
|
/** The embedded base node. */
|
5738
6951
|
pm_node_t base;
|
5739
6952
|
|
6953
|
+
|
5740
6954
|
/**
|
5741
6955
|
* SymbolNode#opening_loc
|
5742
6956
|
*/
|
@@ -5761,19 +6975,30 @@ typedef struct pm_symbol_node {
|
|
5761
6975
|
/**
|
5762
6976
|
* TrueNode
|
5763
6977
|
*
|
5764
|
-
*
|
6978
|
+
* Represents the use of the literal `true` keyword.
|
6979
|
+
*
|
6980
|
+
* true
|
6981
|
+
* ^^^^
|
6982
|
+
*
|
6983
|
+
* Type: ::PM_TRUE_NODE
|
5765
6984
|
*
|
5766
6985
|
* @extends pm_node_t
|
5767
6986
|
*/
|
5768
6987
|
typedef struct pm_true_node {
|
5769
6988
|
/** The embedded base node. */
|
5770
6989
|
pm_node_t base;
|
6990
|
+
|
5771
6991
|
} pm_true_node_t;
|
5772
6992
|
|
5773
6993
|
/**
|
5774
6994
|
* UndefNode
|
5775
6995
|
*
|
5776
|
-
*
|
6996
|
+
* Represents the use of the `undef` keyword.
|
6997
|
+
*
|
6998
|
+
* undef :foo, :bar, :baz
|
6999
|
+
* ^^^^^^^^^^^^^^^^^^^^^^
|
7000
|
+
*
|
7001
|
+
* Type: ::PM_UNDEF_NODE
|
5777
7002
|
*
|
5778
7003
|
* @extends pm_node_t
|
5779
7004
|
*/
|
@@ -5781,6 +7006,7 @@ typedef struct pm_undef_node {
|
|
5781
7006
|
/** The embedded base node. */
|
5782
7007
|
pm_node_t base;
|
5783
7008
|
|
7009
|
+
|
5784
7010
|
/**
|
5785
7011
|
* UndefNode#names
|
5786
7012
|
*/
|
@@ -5795,7 +7021,15 @@ typedef struct pm_undef_node {
|
|
5795
7021
|
/**
|
5796
7022
|
* UnlessNode
|
5797
7023
|
*
|
5798
|
-
*
|
7024
|
+
* Represents the use of the `unless` keyword, either in the block form or the modifier form.
|
7025
|
+
*
|
7026
|
+
* bar unless foo
|
7027
|
+
* ^^^^^^^^^^^^^^
|
7028
|
+
*
|
7029
|
+
* unless foo then bar end
|
7030
|
+
* ^^^^^^^^^^^^^^^^^^^^^^^
|
7031
|
+
*
|
7032
|
+
* Type: ::PM_UNLESS_NODE
|
5799
7033
|
*
|
5800
7034
|
* @extends pm_node_t
|
5801
7035
|
*/
|
@@ -5803,6 +7037,7 @@ typedef struct pm_unless_node {
|
|
5803
7037
|
/** The embedded base node. */
|
5804
7038
|
pm_node_t base;
|
5805
7039
|
|
7040
|
+
|
5806
7041
|
/**
|
5807
7042
|
* UnlessNode#keyword_loc
|
5808
7043
|
*
|
@@ -5833,7 +7068,9 @@ typedef struct pm_unless_node {
|
|
5833
7068
|
* UnlessNode#then_keyword_loc
|
5834
7069
|
*
|
5835
7070
|
* The location of the `then` keyword, if present.
|
5836
|
-
*
|
7071
|
+
*
|
7072
|
+
* unless cond then bar end
|
7073
|
+
* ^^^^
|
5837
7074
|
*/
|
5838
7075
|
pm_location_t then_keyword_loc;
|
5839
7076
|
|
@@ -5849,14 +7086,14 @@ typedef struct pm_unless_node {
|
|
5849
7086
|
struct pm_statements_node *statements;
|
5850
7087
|
|
5851
7088
|
/**
|
5852
|
-
* UnlessNode#
|
7089
|
+
* UnlessNode#else_clause
|
5853
7090
|
*
|
5854
7091
|
* The else clause of the unless expression, if present.
|
5855
7092
|
*
|
5856
7093
|
* unless cond then bar else baz end
|
5857
7094
|
* ^^^^^^^^
|
5858
7095
|
*/
|
5859
|
-
struct pm_else_node *
|
7096
|
+
struct pm_else_node *else_clause;
|
5860
7097
|
|
5861
7098
|
/**
|
5862
7099
|
* UnlessNode#end_keyword_loc
|
@@ -5872,9 +7109,18 @@ typedef struct pm_unless_node {
|
|
5872
7109
|
/**
|
5873
7110
|
* UntilNode
|
5874
7111
|
*
|
5875
|
-
*
|
5876
|
-
*
|
5877
|
-
*
|
7112
|
+
* Represents the use of the `until` keyword, either in the block form or the modifier form.
|
7113
|
+
*
|
7114
|
+
* bar until foo
|
7115
|
+
* ^^^^^^^^^^^^^
|
7116
|
+
*
|
7117
|
+
* until foo do bar end
|
7118
|
+
* ^^^^^^^^^^^^^^^^^^^^
|
7119
|
+
*
|
7120
|
+
* Type: ::PM_UNTIL_NODE
|
7121
|
+
|
7122
|
+
* Flags (#pm_loop_flags):
|
7123
|
+
* * ::PM_LOOP_FLAGS_BEGIN_MODIFIER
|
5878
7124
|
*
|
5879
7125
|
* @extends pm_node_t
|
5880
7126
|
*/
|
@@ -5882,6 +7128,7 @@ typedef struct pm_until_node {
|
|
5882
7128
|
/** The embedded base node. */
|
5883
7129
|
pm_node_t base;
|
5884
7130
|
|
7131
|
+
|
5885
7132
|
/**
|
5886
7133
|
* UntilNode#keyword_loc
|
5887
7134
|
*/
|
@@ -5906,7 +7153,14 @@ typedef struct pm_until_node {
|
|
5906
7153
|
/**
|
5907
7154
|
* WhenNode
|
5908
7155
|
*
|
5909
|
-
*
|
7156
|
+
* Represents the use of the `when` keyword within a case statement.
|
7157
|
+
*
|
7158
|
+
* case true
|
7159
|
+
* when true
|
7160
|
+
* ^^^^^^^^^
|
7161
|
+
* end
|
7162
|
+
*
|
7163
|
+
* Type: ::PM_WHEN_NODE
|
5910
7164
|
*
|
5911
7165
|
* @extends pm_node_t
|
5912
7166
|
*/
|
@@ -5914,6 +7168,7 @@ typedef struct pm_when_node {
|
|
5914
7168
|
/** The embedded base node. */
|
5915
7169
|
pm_node_t base;
|
5916
7170
|
|
7171
|
+
|
5917
7172
|
/**
|
5918
7173
|
* WhenNode#keyword_loc
|
5919
7174
|
*/
|
@@ -5938,9 +7193,18 @@ typedef struct pm_when_node {
|
|
5938
7193
|
/**
|
5939
7194
|
* WhileNode
|
5940
7195
|
*
|
5941
|
-
*
|
5942
|
-
*
|
5943
|
-
*
|
7196
|
+
* Represents the use of the `while` keyword, either in the block form or the modifier form.
|
7197
|
+
*
|
7198
|
+
* bar while foo
|
7199
|
+
* ^^^^^^^^^^^^^
|
7200
|
+
*
|
7201
|
+
* while foo do bar end
|
7202
|
+
* ^^^^^^^^^^^^^^^^^^^^
|
7203
|
+
*
|
7204
|
+
* Type: ::PM_WHILE_NODE
|
7205
|
+
|
7206
|
+
* Flags (#pm_loop_flags):
|
7207
|
+
* * ::PM_LOOP_FLAGS_BEGIN_MODIFIER
|
5944
7208
|
*
|
5945
7209
|
* @extends pm_node_t
|
5946
7210
|
*/
|
@@ -5948,6 +7212,7 @@ typedef struct pm_while_node {
|
|
5948
7212
|
/** The embedded base node. */
|
5949
7213
|
pm_node_t base;
|
5950
7214
|
|
7215
|
+
|
5951
7216
|
/**
|
5952
7217
|
* WhileNode#keyword_loc
|
5953
7218
|
*/
|
@@ -5972,10 +7237,16 @@ typedef struct pm_while_node {
|
|
5972
7237
|
/**
|
5973
7238
|
* XStringNode
|
5974
7239
|
*
|
5975
|
-
*
|
5976
|
-
*
|
5977
|
-
*
|
5978
|
-
*
|
7240
|
+
* Represents an xstring literal with no interpolation.
|
7241
|
+
*
|
7242
|
+
* `foo`
|
7243
|
+
* ^^^^^
|
7244
|
+
*
|
7245
|
+
* Type: ::PM_X_STRING_NODE
|
7246
|
+
|
7247
|
+
* Flags (#pm_encoding_flags):
|
7248
|
+
* * ::PM_ENCODING_FLAGS_FORCED_UTF8_ENCODING
|
7249
|
+
* * ::PM_ENCODING_FLAGS_FORCED_BINARY_ENCODING
|
5979
7250
|
*
|
5980
7251
|
* @extends pm_node_t
|
5981
7252
|
*/
|
@@ -5983,6 +7254,7 @@ typedef struct pm_x_string_node {
|
|
5983
7254
|
/** The embedded base node. */
|
5984
7255
|
pm_node_t base;
|
5985
7256
|
|
7257
|
+
|
5986
7258
|
/**
|
5987
7259
|
* XStringNode#opening_loc
|
5988
7260
|
*/
|
@@ -6007,7 +7279,12 @@ typedef struct pm_x_string_node {
|
|
6007
7279
|
/**
|
6008
7280
|
* YieldNode
|
6009
7281
|
*
|
6010
|
-
*
|
7282
|
+
* Represents the use of the `yield` keyword.
|
7283
|
+
*
|
7284
|
+
* yield 1
|
7285
|
+
* ^^^^^^^
|
7286
|
+
*
|
7287
|
+
* Type: ::PM_YIELD_NODE
|
6011
7288
|
*
|
6012
7289
|
* @extends pm_node_t
|
6013
7290
|
*/
|
@@ -6015,6 +7292,7 @@ typedef struct pm_yield_node {
|
|
6015
7292
|
/** The embedded base node. */
|
6016
7293
|
pm_node_t base;
|
6017
7294
|
|
7295
|
+
|
6018
7296
|
/**
|
6019
7297
|
* YieldNode#keyword_loc
|
6020
7298
|
*/
|
@@ -6040,11 +7318,20 @@ typedef struct pm_yield_node {
|
|
6040
7318
|
* Flags for arguments nodes.
|
6041
7319
|
*/
|
6042
7320
|
typedef enum pm_arguments_node_flags {
|
6043
|
-
/** if arguments contain
|
6044
|
-
|
7321
|
+
/** if the arguments contain forwarding */
|
7322
|
+
PM_ARGUMENTS_NODE_FLAGS_CONTAINS_FORWARDING = 4,
|
6045
7323
|
|
6046
|
-
/** if arguments contain
|
6047
|
-
|
7324
|
+
/** if the arguments contain keywords */
|
7325
|
+
PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORDS = 8,
|
7326
|
+
|
7327
|
+
/** if the arguments contain a keyword splat */
|
7328
|
+
PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORD_SPLAT = 16,
|
7329
|
+
|
7330
|
+
/** if the arguments contain a splat */
|
7331
|
+
PM_ARGUMENTS_NODE_FLAGS_CONTAINS_SPLAT = 32,
|
7332
|
+
|
7333
|
+
/** if the arguments contain multiple splats */
|
7334
|
+
PM_ARGUMENTS_NODE_FLAGS_CONTAINS_MULTIPLE_SPLATS = 64,
|
6048
7335
|
} pm_arguments_node_flags_t;
|
6049
7336
|
|
6050
7337
|
/**
|
@@ -6052,7 +7339,7 @@ typedef enum pm_arguments_node_flags {
|
|
6052
7339
|
*/
|
6053
7340
|
typedef enum pm_array_node_flags {
|
6054
7341
|
/** if array contains splat nodes */
|
6055
|
-
PM_ARRAY_NODE_FLAGS_CONTAINS_SPLAT =
|
7342
|
+
PM_ARRAY_NODE_FLAGS_CONTAINS_SPLAT = 4,
|
6056
7343
|
} pm_array_node_flags_t;
|
6057
7344
|
|
6058
7345
|
/**
|
@@ -6060,16 +7347,16 @@ typedef enum pm_array_node_flags {
|
|
6060
7347
|
*/
|
6061
7348
|
typedef enum pm_call_node_flags {
|
6062
7349
|
/** &. operator */
|
6063
|
-
PM_CALL_NODE_FLAGS_SAFE_NAVIGATION =
|
7350
|
+
PM_CALL_NODE_FLAGS_SAFE_NAVIGATION = 4,
|
6064
7351
|
|
6065
7352
|
/** a call that could have been a local variable */
|
6066
|
-
PM_CALL_NODE_FLAGS_VARIABLE_CALL =
|
7353
|
+
PM_CALL_NODE_FLAGS_VARIABLE_CALL = 8,
|
6067
7354
|
|
6068
7355
|
/** a call that is an attribute write, so the value being written should be returned */
|
6069
|
-
PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE =
|
7356
|
+
PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE = 16,
|
6070
7357
|
|
6071
7358
|
/** a call that ignores method visibility */
|
6072
|
-
PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY =
|
7359
|
+
PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY = 32,
|
6073
7360
|
} pm_call_node_flags_t;
|
6074
7361
|
|
6075
7362
|
/**
|
@@ -6077,10 +7364,10 @@ typedef enum pm_call_node_flags {
|
|
6077
7364
|
*/
|
6078
7365
|
typedef enum pm_encoding_flags {
|
6079
7366
|
/** internal bytes forced the encoding to UTF-8 */
|
6080
|
-
PM_ENCODING_FLAGS_FORCED_UTF8_ENCODING =
|
7367
|
+
PM_ENCODING_FLAGS_FORCED_UTF8_ENCODING = 4,
|
6081
7368
|
|
6082
7369
|
/** internal bytes forced the encoding to binary */
|
6083
|
-
PM_ENCODING_FLAGS_FORCED_BINARY_ENCODING =
|
7370
|
+
PM_ENCODING_FLAGS_FORCED_BINARY_ENCODING = 8,
|
6084
7371
|
} pm_encoding_flags_t;
|
6085
7372
|
|
6086
7373
|
/**
|
@@ -6088,16 +7375,16 @@ typedef enum pm_encoding_flags {
|
|
6088
7375
|
*/
|
6089
7376
|
typedef enum pm_integer_base_flags {
|
6090
7377
|
/** 0b prefix */
|
6091
|
-
PM_INTEGER_BASE_FLAGS_BINARY =
|
7378
|
+
PM_INTEGER_BASE_FLAGS_BINARY = 4,
|
6092
7379
|
|
6093
7380
|
/** 0d or no prefix */
|
6094
|
-
PM_INTEGER_BASE_FLAGS_DECIMAL =
|
7381
|
+
PM_INTEGER_BASE_FLAGS_DECIMAL = 8,
|
6095
7382
|
|
6096
7383
|
/** 0o or 0 prefix */
|
6097
|
-
PM_INTEGER_BASE_FLAGS_OCTAL =
|
7384
|
+
PM_INTEGER_BASE_FLAGS_OCTAL = 16,
|
6098
7385
|
|
6099
7386
|
/** 0x prefix */
|
6100
|
-
PM_INTEGER_BASE_FLAGS_HEXADECIMAL =
|
7387
|
+
PM_INTEGER_BASE_FLAGS_HEXADECIMAL = 32,
|
6101
7388
|
} pm_integer_base_flags_t;
|
6102
7389
|
|
6103
7390
|
/**
|
@@ -6105,10 +7392,10 @@ typedef enum pm_integer_base_flags {
|
|
6105
7392
|
*/
|
6106
7393
|
typedef enum pm_interpolated_string_node_flags {
|
6107
7394
|
/** frozen by virtue of a `frozen_string_literal: true` comment or `--enable-frozen-string-literal`; only for adjacent string literals like `'a' 'b'` */
|
6108
|
-
PM_INTERPOLATED_STRING_NODE_FLAGS_FROZEN =
|
7395
|
+
PM_INTERPOLATED_STRING_NODE_FLAGS_FROZEN = 4,
|
6109
7396
|
|
6110
7397
|
/** mutable by virtue of a `frozen_string_literal: false` comment or `--disable-frozen-string-literal`; only for adjacent string literals like `'a' 'b'` */
|
6111
|
-
PM_INTERPOLATED_STRING_NODE_FLAGS_MUTABLE =
|
7398
|
+
PM_INTERPOLATED_STRING_NODE_FLAGS_MUTABLE = 8,
|
6112
7399
|
} pm_interpolated_string_node_flags_t;
|
6113
7400
|
|
6114
7401
|
/**
|
@@ -6116,7 +7403,7 @@ typedef enum pm_interpolated_string_node_flags {
|
|
6116
7403
|
*/
|
6117
7404
|
typedef enum pm_keyword_hash_node_flags {
|
6118
7405
|
/** a keyword hash which only has `AssocNode` elements all with symbol keys, which means the elements can be treated as keyword arguments */
|
6119
|
-
PM_KEYWORD_HASH_NODE_FLAGS_SYMBOL_KEYS =
|
7406
|
+
PM_KEYWORD_HASH_NODE_FLAGS_SYMBOL_KEYS = 4,
|
6120
7407
|
} pm_keyword_hash_node_flags_t;
|
6121
7408
|
|
6122
7409
|
/**
|
@@ -6124,7 +7411,7 @@ typedef enum pm_keyword_hash_node_flags {
|
|
6124
7411
|
*/
|
6125
7412
|
typedef enum pm_loop_flags {
|
6126
7413
|
/** a loop after a begin statement, so the body is executed first before the condition */
|
6127
|
-
PM_LOOP_FLAGS_BEGIN_MODIFIER =
|
7414
|
+
PM_LOOP_FLAGS_BEGIN_MODIFIER = 4,
|
6128
7415
|
} pm_loop_flags_t;
|
6129
7416
|
|
6130
7417
|
/**
|
@@ -6132,7 +7419,7 @@ typedef enum pm_loop_flags {
|
|
6132
7419
|
*/
|
6133
7420
|
typedef enum pm_parameter_flags {
|
6134
7421
|
/** a parameter name that has been repeated in the method signature */
|
6135
|
-
PM_PARAMETER_FLAGS_REPEATED_PARAMETER =
|
7422
|
+
PM_PARAMETER_FLAGS_REPEATED_PARAMETER = 4,
|
6136
7423
|
} pm_parameter_flags_t;
|
6137
7424
|
|
6138
7425
|
/**
|
@@ -6140,7 +7427,7 @@ typedef enum pm_parameter_flags {
|
|
6140
7427
|
*/
|
6141
7428
|
typedef enum pm_range_flags {
|
6142
7429
|
/** ... operator */
|
6143
|
-
PM_RANGE_FLAGS_EXCLUDE_END =
|
7430
|
+
PM_RANGE_FLAGS_EXCLUDE_END = 4,
|
6144
7431
|
} pm_range_flags_t;
|
6145
7432
|
|
6146
7433
|
/**
|
@@ -6148,59 +7435,51 @@ typedef enum pm_range_flags {
|
|
6148
7435
|
*/
|
6149
7436
|
typedef enum pm_regular_expression_flags {
|
6150
7437
|
/** i - ignores the case of characters when matching */
|
6151
|
-
PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE =
|
7438
|
+
PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE = 4,
|
6152
7439
|
|
6153
7440
|
/** x - ignores whitespace and allows comments in regular expressions */
|
6154
|
-
PM_REGULAR_EXPRESSION_FLAGS_EXTENDED =
|
7441
|
+
PM_REGULAR_EXPRESSION_FLAGS_EXTENDED = 8,
|
6155
7442
|
|
6156
7443
|
/** m - allows $ to match the end of lines within strings */
|
6157
|
-
PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE =
|
7444
|
+
PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE = 16,
|
6158
7445
|
|
6159
7446
|
/** o - only interpolates values into the regular expression once */
|
6160
|
-
PM_REGULAR_EXPRESSION_FLAGS_ONCE =
|
7447
|
+
PM_REGULAR_EXPRESSION_FLAGS_ONCE = 32,
|
6161
7448
|
|
6162
7449
|
/** e - forces the EUC-JP encoding */
|
6163
|
-
PM_REGULAR_EXPRESSION_FLAGS_EUC_JP =
|
7450
|
+
PM_REGULAR_EXPRESSION_FLAGS_EUC_JP = 64,
|
6164
7451
|
|
6165
7452
|
/** n - forces the ASCII-8BIT encoding */
|
6166
|
-
PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT =
|
7453
|
+
PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT = 128,
|
6167
7454
|
|
6168
7455
|
/** s - forces the Windows-31J encoding */
|
6169
|
-
PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J =
|
7456
|
+
PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J = 256,
|
6170
7457
|
|
6171
7458
|
/** u - forces the UTF-8 encoding */
|
6172
|
-
PM_REGULAR_EXPRESSION_FLAGS_UTF_8 =
|
7459
|
+
PM_REGULAR_EXPRESSION_FLAGS_UTF_8 = 512,
|
6173
7460
|
|
6174
7461
|
/** internal bytes forced the encoding to UTF-8 */
|
6175
|
-
PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING =
|
7462
|
+
PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING = 1024,
|
6176
7463
|
|
6177
7464
|
/** internal bytes forced the encoding to binary */
|
6178
|
-
PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING =
|
7465
|
+
PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING = 2048,
|
6179
7466
|
|
6180
7467
|
/** internal bytes forced the encoding to US-ASCII */
|
6181
|
-
PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING =
|
7468
|
+
PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING = 4096,
|
6182
7469
|
} pm_regular_expression_flags_t;
|
6183
7470
|
|
6184
|
-
/**
|
6185
|
-
* Flags for return nodes.
|
6186
|
-
*/
|
6187
|
-
typedef enum pm_return_node_flags {
|
6188
|
-
/** a return statement that is redundant because it is the last statement in a method */
|
6189
|
-
PM_RETURN_NODE_FLAGS_REDUNDANT = 1,
|
6190
|
-
} pm_return_node_flags_t;
|
6191
|
-
|
6192
7471
|
/**
|
6193
7472
|
* Flags for shareable constant nodes.
|
6194
7473
|
*/
|
6195
7474
|
typedef enum pm_shareable_constant_node_flags {
|
6196
7475
|
/** constant writes that should be modified with shareable constant value literal */
|
6197
|
-
PM_SHAREABLE_CONSTANT_NODE_FLAGS_LITERAL =
|
7476
|
+
PM_SHAREABLE_CONSTANT_NODE_FLAGS_LITERAL = 4,
|
6198
7477
|
|
6199
7478
|
/** constant writes that should be modified with shareable constant value experimental everything */
|
6200
|
-
PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_EVERYTHING =
|
7479
|
+
PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_EVERYTHING = 8,
|
6201
7480
|
|
6202
7481
|
/** constant writes that should be modified with shareable constant value experimental copy */
|
6203
|
-
PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_COPY =
|
7482
|
+
PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_COPY = 16,
|
6204
7483
|
} pm_shareable_constant_node_flags_t;
|
6205
7484
|
|
6206
7485
|
/**
|
@@ -6208,16 +7487,16 @@ typedef enum pm_shareable_constant_node_flags {
|
|
6208
7487
|
*/
|
6209
7488
|
typedef enum pm_string_flags {
|
6210
7489
|
/** internal bytes forced the encoding to UTF-8 */
|
6211
|
-
PM_STRING_FLAGS_FORCED_UTF8_ENCODING =
|
7490
|
+
PM_STRING_FLAGS_FORCED_UTF8_ENCODING = 4,
|
6212
7491
|
|
6213
7492
|
/** internal bytes forced the encoding to binary */
|
6214
|
-
PM_STRING_FLAGS_FORCED_BINARY_ENCODING =
|
7493
|
+
PM_STRING_FLAGS_FORCED_BINARY_ENCODING = 8,
|
6215
7494
|
|
6216
7495
|
/** frozen by virtue of a `frozen_string_literal: true` comment or `--enable-frozen-string-literal` */
|
6217
|
-
PM_STRING_FLAGS_FROZEN =
|
7496
|
+
PM_STRING_FLAGS_FROZEN = 16,
|
6218
7497
|
|
6219
7498
|
/** mutable by virtue of a `frozen_string_literal: false` comment or `--disable-frozen-string-literal` */
|
6220
|
-
PM_STRING_FLAGS_MUTABLE =
|
7499
|
+
PM_STRING_FLAGS_MUTABLE = 32,
|
6221
7500
|
} pm_string_flags_t;
|
6222
7501
|
|
6223
7502
|
/**
|
@@ -6225,13 +7504,13 @@ typedef enum pm_string_flags {
|
|
6225
7504
|
*/
|
6226
7505
|
typedef enum pm_symbol_flags {
|
6227
7506
|
/** internal bytes forced the encoding to UTF-8 */
|
6228
|
-
PM_SYMBOL_FLAGS_FORCED_UTF8_ENCODING =
|
7507
|
+
PM_SYMBOL_FLAGS_FORCED_UTF8_ENCODING = 4,
|
6229
7508
|
|
6230
7509
|
/** internal bytes forced the encoding to binary */
|
6231
|
-
PM_SYMBOL_FLAGS_FORCED_BINARY_ENCODING =
|
7510
|
+
PM_SYMBOL_FLAGS_FORCED_BINARY_ENCODING = 8,
|
6232
7511
|
|
6233
7512
|
/** internal bytes forced the encoding to US-ASCII */
|
6234
|
-
PM_SYMBOL_FLAGS_FORCED_US_ASCII_ENCODING =
|
7513
|
+
PM_SYMBOL_FLAGS_FORCED_US_ASCII_ENCODING = 16,
|
6235
7514
|
} pm_symbol_flags_t;
|
6236
7515
|
|
6237
7516
|
/**
|
@@ -6240,6 +7519,6 @@ typedef enum pm_symbol_flags {
|
|
6240
7519
|
* to specify that through the environment. It will never be true except for in
|
6241
7520
|
* those build systems.
|
6242
7521
|
*/
|
6243
|
-
#define PRISM_SERIALIZE_ONLY_SEMANTICS_FIELDS
|
7522
|
+
#define PRISM_SERIALIZE_ONLY_SEMANTICS_FIELDS 0
|
6244
7523
|
|
6245
7524
|
#endif
|