prism 0.18.0 → 0.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +31 -1
- data/README.md +2 -1
- data/config.yml +188 -55
- data/docs/building.md +9 -2
- data/docs/configuration.md +10 -9
- data/docs/encoding.md +24 -56
- data/docs/local_variable_depth.md +229 -0
- data/docs/ruby_api.md +2 -0
- data/docs/serialization.md +18 -13
- data/ext/prism/api_node.c +337 -195
- data/ext/prism/extconf.rb +13 -7
- data/ext/prism/extension.c +96 -32
- data/ext/prism/extension.h +1 -1
- data/include/prism/ast.h +340 -137
- data/include/prism/defines.h +17 -0
- data/include/prism/diagnostic.h +11 -5
- data/include/prism/encoding.h +248 -0
- data/include/prism/options.h +2 -2
- data/include/prism/parser.h +62 -42
- data/include/prism/regexp.h +2 -2
- data/include/prism/util/pm_buffer.h +9 -1
- data/include/prism/util/pm_memchr.h +2 -2
- data/include/prism/util/pm_strpbrk.h +3 -3
- data/include/prism/version.h +2 -2
- data/include/prism.h +13 -15
- data/lib/prism/compiler.rb +12 -0
- data/lib/prism/debug.rb +9 -4
- data/lib/prism/desugar_compiler.rb +3 -3
- data/lib/prism/dispatcher.rb +56 -0
- data/lib/prism/dot_visitor.rb +476 -198
- data/lib/prism/dsl.rb +66 -46
- data/lib/prism/ffi.rb +16 -3
- data/lib/prism/lex_compat.rb +19 -9
- data/lib/prism/mutation_compiler.rb +20 -0
- data/lib/prism/node.rb +1173 -450
- data/lib/prism/node_ext.rb +41 -16
- data/lib/prism/parse_result.rb +12 -15
- data/lib/prism/ripper_compat.rb +49 -34
- data/lib/prism/serialize.rb +242 -212
- data/lib/prism/visitor.rb +12 -0
- data/lib/prism.rb +20 -4
- data/prism.gemspec +4 -10
- data/rbi/prism.rbi +605 -230
- data/rbi/prism_static.rbi +3 -0
- data/sig/prism.rbs +379 -124
- data/sig/prism_static.rbs +1 -0
- data/src/diagnostic.c +228 -222
- data/src/encoding.c +5137 -0
- data/src/node.c +66 -0
- data/src/options.c +21 -2
- data/src/prettyprint.c +806 -406
- data/src/prism.c +1092 -700
- data/src/regexp.c +3 -3
- data/src/serialize.c +227 -157
- data/src/util/pm_buffer.c +10 -1
- data/src/util/pm_memchr.c +1 -1
- data/src/util/pm_strpbrk.c +4 -4
- metadata +5 -11
- data/include/prism/enc/pm_encoding.h +0 -227
- data/src/enc/pm_big5.c +0 -116
- data/src/enc/pm_cp51932.c +0 -57
- data/src/enc/pm_euc_jp.c +0 -69
- data/src/enc/pm_gbk.c +0 -65
- data/src/enc/pm_shift_jis.c +0 -57
- data/src/enc/pm_tables.c +0 -2073
- data/src/enc/pm_unicode.c +0 -2369
- data/src/enc/pm_windows_31j.c +0 -57
data/sig/prism.rbs
CHANGED
@@ -100,10 +100,10 @@ module Prism
|
|
100
100
|
# return foo, bar, baz
|
101
101
|
# ^^^^^^^^^^^^^
|
102
102
|
class ArgumentsNode < Node
|
103
|
-
attr_reader arguments: Array[Node]
|
104
103
|
attr_reader flags: Integer
|
104
|
+
attr_reader arguments: Array[Node]
|
105
105
|
|
106
|
-
def initialize: (arguments: Array[Node],
|
106
|
+
def initialize: (flags: Integer, arguments: Array[Node], location: Location) -> void
|
107
107
|
def accept: (visitor: Visitor) -> void
|
108
108
|
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
109
109
|
def child_nodes: () -> Array[Node?]
|
@@ -113,7 +113,7 @@ module Prism
|
|
113
113
|
|
114
114
|
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
|
115
115
|
|
116
|
-
def
|
116
|
+
def contains_keyword_splat?: () -> bool
|
117
117
|
|
118
118
|
def inspect: (inspector: NodeInspector) -> String
|
119
119
|
end
|
@@ -123,11 +123,12 @@ module Prism
|
|
123
123
|
# [1, 2, 3]
|
124
124
|
# ^^^^^^^^^
|
125
125
|
class ArrayNode < Node
|
126
|
+
attr_reader flags: Integer
|
126
127
|
attr_reader elements: Array[Node]
|
127
128
|
attr_reader opening_loc: Location?
|
128
129
|
attr_reader closing_loc: Location?
|
129
130
|
|
130
|
-
def initialize: (elements: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void
|
131
|
+
def initialize: (flags: Integer, elements: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void
|
131
132
|
def accept: (visitor: Visitor) -> void
|
132
133
|
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
133
134
|
def child_nodes: () -> Array[Node?]
|
@@ -137,6 +138,8 @@ module Prism
|
|
137
138
|
|
138
139
|
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
|
139
140
|
|
141
|
+
def contains_splat?: () -> bool
|
142
|
+
|
140
143
|
def opening: () -> String?
|
141
144
|
|
142
145
|
def closing: () -> String?
|
@@ -324,12 +327,13 @@ module Prism
|
|
324
327
|
# ^^^^^^^^^^^^^^
|
325
328
|
class BlockNode < Node
|
326
329
|
attr_reader locals: Array[Symbol]
|
327
|
-
attr_reader
|
330
|
+
attr_reader locals_body_index: Integer
|
331
|
+
attr_reader parameters: Node?
|
328
332
|
attr_reader body: Node?
|
329
333
|
attr_reader opening_loc: Location
|
330
334
|
attr_reader closing_loc: Location
|
331
335
|
|
332
|
-
def initialize: (locals: Array[Symbol], parameters:
|
336
|
+
def initialize: (locals: Array[Symbol], locals_body_index: Integer, parameters: Node?, body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> void
|
333
337
|
def accept: (visitor: Visitor) -> void
|
334
338
|
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
335
339
|
def child_nodes: () -> Array[Node?]
|
@@ -426,16 +430,16 @@ module Prism
|
|
426
430
|
# foo.bar &&= value
|
427
431
|
# ^^^^^^^^^^^^^^^^^
|
428
432
|
class CallAndWriteNode < Node
|
433
|
+
attr_reader flags: Integer
|
429
434
|
attr_reader receiver: Node?
|
430
435
|
attr_reader call_operator_loc: Location?
|
431
436
|
attr_reader message_loc: Location?
|
432
|
-
attr_reader flags: Integer
|
433
437
|
attr_reader read_name: Symbol
|
434
438
|
attr_reader write_name: Symbol
|
435
439
|
attr_reader operator_loc: Location
|
436
440
|
attr_reader value: Node
|
437
441
|
|
438
|
-
def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?,
|
442
|
+
def initialize: (flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> void
|
439
443
|
def accept: (visitor: Visitor) -> void
|
440
444
|
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
441
445
|
def child_nodes: () -> Array[Node?]
|
@@ -445,14 +449,16 @@ module Prism
|
|
445
449
|
|
446
450
|
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
|
447
451
|
|
448
|
-
def call_operator: () -> String?
|
449
|
-
|
450
|
-
def message: () -> String?
|
451
|
-
|
452
452
|
def safe_navigation?: () -> bool
|
453
453
|
|
454
454
|
def variable_call?: () -> bool
|
455
455
|
|
456
|
+
def attribute_write?: () -> bool
|
457
|
+
|
458
|
+
def call_operator: () -> String?
|
459
|
+
|
460
|
+
def message: () -> String?
|
461
|
+
|
456
462
|
def operator: () -> String
|
457
463
|
|
458
464
|
def inspect: (inspector: NodeInspector) -> String
|
@@ -477,17 +483,17 @@ module Prism
|
|
477
483
|
# foo&.bar
|
478
484
|
# ^^^^^^^^
|
479
485
|
class CallNode < Node
|
486
|
+
attr_reader flags: Integer
|
480
487
|
attr_reader receiver: Node?
|
481
488
|
attr_reader call_operator_loc: Location?
|
489
|
+
attr_reader name: Symbol
|
482
490
|
attr_reader message_loc: Location?
|
483
491
|
attr_reader opening_loc: Location?
|
484
492
|
attr_reader arguments: ArgumentsNode?
|
485
493
|
attr_reader closing_loc: Location?
|
486
494
|
attr_reader block: Node?
|
487
|
-
attr_reader flags: Integer
|
488
|
-
attr_reader name: Symbol
|
489
495
|
|
490
|
-
def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Node?,
|
496
|
+
def initialize: (flags: Integer, receiver: Node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Node?, location: Location) -> void
|
491
497
|
def accept: (visitor: Visitor) -> void
|
492
498
|
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
493
499
|
def child_nodes: () -> Array[Node?]
|
@@ -497,6 +503,12 @@ module Prism
|
|
497
503
|
|
498
504
|
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
|
499
505
|
|
506
|
+
def safe_navigation?: () -> bool
|
507
|
+
|
508
|
+
def variable_call?: () -> bool
|
509
|
+
|
510
|
+
def attribute_write?: () -> bool
|
511
|
+
|
500
512
|
def call_operator: () -> String?
|
501
513
|
|
502
514
|
def message: () -> String?
|
@@ -505,10 +517,6 @@ module Prism
|
|
505
517
|
|
506
518
|
def closing: () -> String?
|
507
519
|
|
508
|
-
def safe_navigation?: () -> bool
|
509
|
-
|
510
|
-
def variable_call?: () -> bool
|
511
|
-
|
512
520
|
def inspect: (inspector: NodeInspector) -> String
|
513
521
|
end
|
514
522
|
# Represents the use of an assignment operator on a call.
|
@@ -516,17 +524,17 @@ module Prism
|
|
516
524
|
# foo.bar += baz
|
517
525
|
# ^^^^^^^^^^^^^^
|
518
526
|
class CallOperatorWriteNode < Node
|
527
|
+
attr_reader flags: Integer
|
519
528
|
attr_reader receiver: Node?
|
520
529
|
attr_reader call_operator_loc: Location?
|
521
530
|
attr_reader message_loc: Location?
|
522
|
-
attr_reader flags: Integer
|
523
531
|
attr_reader read_name: Symbol
|
524
532
|
attr_reader write_name: Symbol
|
525
533
|
attr_reader operator: Symbol
|
526
534
|
attr_reader operator_loc: Location
|
527
535
|
attr_reader value: Node
|
528
536
|
|
529
|
-
def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?,
|
537
|
+
def initialize: (flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> void
|
530
538
|
def accept: (visitor: Visitor) -> void
|
531
539
|
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
532
540
|
def child_nodes: () -> Array[Node?]
|
@@ -536,14 +544,16 @@ module Prism
|
|
536
544
|
|
537
545
|
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
|
538
546
|
|
539
|
-
def call_operator: () -> String?
|
540
|
-
|
541
|
-
def message: () -> String?
|
542
|
-
|
543
547
|
def safe_navigation?: () -> bool
|
544
548
|
|
545
549
|
def variable_call?: () -> bool
|
546
550
|
|
551
|
+
def attribute_write?: () -> bool
|
552
|
+
|
553
|
+
def call_operator: () -> String?
|
554
|
+
|
555
|
+
def message: () -> String?
|
556
|
+
|
547
557
|
def inspect: (inspector: NodeInspector) -> String
|
548
558
|
end
|
549
559
|
# Represents the use of the `||=` operator on a call.
|
@@ -551,16 +561,16 @@ module Prism
|
|
551
561
|
# foo.bar ||= value
|
552
562
|
# ^^^^^^^^^^^^^^^^^
|
553
563
|
class CallOrWriteNode < Node
|
564
|
+
attr_reader flags: Integer
|
554
565
|
attr_reader receiver: Node?
|
555
566
|
attr_reader call_operator_loc: Location?
|
556
567
|
attr_reader message_loc: Location?
|
557
|
-
attr_reader flags: Integer
|
558
568
|
attr_reader read_name: Symbol
|
559
569
|
attr_reader write_name: Symbol
|
560
570
|
attr_reader operator_loc: Location
|
561
571
|
attr_reader value: Node
|
562
572
|
|
563
|
-
def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?,
|
573
|
+
def initialize: (flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> void
|
564
574
|
def accept: (visitor: Visitor) -> void
|
565
575
|
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
566
576
|
def child_nodes: () -> Array[Node?]
|
@@ -570,15 +580,58 @@ module Prism
|
|
570
580
|
|
571
581
|
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
|
572
582
|
|
583
|
+
def safe_navigation?: () -> bool
|
584
|
+
|
585
|
+
def variable_call?: () -> bool
|
586
|
+
|
587
|
+
def attribute_write?: () -> bool
|
588
|
+
|
573
589
|
def call_operator: () -> String?
|
574
590
|
|
575
591
|
def message: () -> String?
|
576
592
|
|
593
|
+
def operator: () -> String
|
594
|
+
|
595
|
+
def inspect: (inspector: NodeInspector) -> String
|
596
|
+
end
|
597
|
+
# Represents assigning to a method call.
|
598
|
+
#
|
599
|
+
# foo.bar, = 1
|
600
|
+
# ^^^^^^^
|
601
|
+
#
|
602
|
+
# begin
|
603
|
+
# rescue => foo.bar
|
604
|
+
# ^^^^^^^
|
605
|
+
# end
|
606
|
+
#
|
607
|
+
# for foo.bar in baz do end
|
608
|
+
# ^^^^^^^
|
609
|
+
class CallTargetNode < Node
|
610
|
+
attr_reader flags: Integer
|
611
|
+
attr_reader receiver: Node
|
612
|
+
attr_reader call_operator_loc: Location
|
613
|
+
attr_reader name: Symbol
|
614
|
+
attr_reader message_loc: Location
|
615
|
+
|
616
|
+
def initialize: (flags: Integer, receiver: Node, call_operator_loc: Location, name: Symbol, message_loc: Location, location: Location) -> void
|
617
|
+
def accept: (visitor: Visitor) -> void
|
618
|
+
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
619
|
+
def child_nodes: () -> Array[Node?]
|
620
|
+
def deconstruct: () -> Array[Node?]
|
621
|
+
|
622
|
+
def copy: (**untyped) -> CallTargetNode
|
623
|
+
|
624
|
+
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
|
625
|
+
|
577
626
|
def safe_navigation?: () -> bool
|
578
627
|
|
579
628
|
def variable_call?: () -> bool
|
580
629
|
|
581
|
-
def
|
630
|
+
def attribute_write?: () -> bool
|
631
|
+
|
632
|
+
def call_operator: () -> String
|
633
|
+
|
634
|
+
def message: () -> String
|
582
635
|
|
583
636
|
def inspect: (inspector: NodeInspector) -> String
|
584
637
|
end
|
@@ -1116,6 +1169,7 @@ module Prism
|
|
1116
1169
|
attr_reader parameters: ParametersNode?
|
1117
1170
|
attr_reader body: Node?
|
1118
1171
|
attr_reader locals: Array[Symbol]
|
1172
|
+
attr_reader locals_body_index: Integer
|
1119
1173
|
attr_reader def_keyword_loc: Location
|
1120
1174
|
attr_reader operator_loc: Location?
|
1121
1175
|
attr_reader lparen_loc: Location?
|
@@ -1123,7 +1177,7 @@ module Prism
|
|
1123
1177
|
attr_reader equal_loc: Location?
|
1124
1178
|
attr_reader end_keyword_loc: Location?
|
1125
1179
|
|
1126
|
-
def initialize: (name: Symbol, name_loc: Location, receiver: Node?, parameters: ParametersNode?, body: Node?, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location) -> void
|
1180
|
+
def initialize: (name: Symbol, name_loc: Location, receiver: Node?, parameters: ParametersNode?, body: Node?, locals: Array[Symbol], locals_body_index: Integer, def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location) -> void
|
1127
1181
|
def accept: (visitor: Visitor) -> void
|
1128
1182
|
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
1129
1183
|
def child_nodes: () -> Array[Node?]
|
@@ -1333,12 +1387,12 @@ module Prism
|
|
1333
1387
|
# baz if foo .. bar
|
1334
1388
|
# ^^^^^^^^^^
|
1335
1389
|
class FlipFlopNode < Node
|
1390
|
+
attr_reader flags: Integer
|
1336
1391
|
attr_reader left: Node?
|
1337
1392
|
attr_reader right: Node?
|
1338
1393
|
attr_reader operator_loc: Location
|
1339
|
-
attr_reader flags: Integer
|
1340
1394
|
|
1341
|
-
def initialize: (left: Node?, right: Node?, operator_loc: Location,
|
1395
|
+
def initialize: (flags: Integer, left: Node?, right: Node?, operator_loc: Location, location: Location) -> void
|
1342
1396
|
def accept: (visitor: Visitor) -> void
|
1343
1397
|
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
1344
1398
|
def child_nodes: () -> Array[Node?]
|
@@ -1348,10 +1402,10 @@ module Prism
|
|
1348
1402
|
|
1349
1403
|
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
|
1350
1404
|
|
1351
|
-
def operator: () -> String
|
1352
|
-
|
1353
1405
|
def exclude_end?: () -> bool
|
1354
1406
|
|
1407
|
+
def operator: () -> String
|
1408
|
+
|
1355
1409
|
def inspect: (inspector: NodeInspector) -> String
|
1356
1410
|
end
|
1357
1411
|
# Represents a floating point number literal.
|
@@ -1726,6 +1780,33 @@ module Prism
|
|
1726
1780
|
|
1727
1781
|
def inspect: (inspector: NodeInspector) -> String
|
1728
1782
|
end
|
1783
|
+
# Represents using a trailing comma to indicate an implicit rest parameter.
|
1784
|
+
#
|
1785
|
+
# foo { |bar,| }
|
1786
|
+
# ^
|
1787
|
+
#
|
1788
|
+
# foo in [bar,]
|
1789
|
+
# ^
|
1790
|
+
#
|
1791
|
+
# for foo, in bar do end
|
1792
|
+
# ^
|
1793
|
+
#
|
1794
|
+
# foo, = bar
|
1795
|
+
# ^
|
1796
|
+
class ImplicitRestNode < Node
|
1797
|
+
|
1798
|
+
def initialize: (location: Location) -> void
|
1799
|
+
def accept: (visitor: Visitor) -> void
|
1800
|
+
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
1801
|
+
def child_nodes: () -> Array[Node?]
|
1802
|
+
def deconstruct: () -> Array[Node?]
|
1803
|
+
|
1804
|
+
def copy: (**untyped) -> ImplicitRestNode
|
1805
|
+
|
1806
|
+
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
|
1807
|
+
|
1808
|
+
def inspect: (inspector: NodeInspector) -> String
|
1809
|
+
end
|
1729
1810
|
# Represents the use of the `in` keyword in a case statement.
|
1730
1811
|
#
|
1731
1812
|
# case a; in b then c end
|
@@ -1757,17 +1838,17 @@ module Prism
|
|
1757
1838
|
# foo.bar[baz] &&= value
|
1758
1839
|
# ^^^^^^^^^^^^^^^^^^^^^^
|
1759
1840
|
class IndexAndWriteNode < Node
|
1841
|
+
attr_reader flags: Integer
|
1760
1842
|
attr_reader receiver: Node?
|
1761
1843
|
attr_reader call_operator_loc: Location?
|
1762
1844
|
attr_reader opening_loc: Location
|
1763
1845
|
attr_reader arguments: ArgumentsNode?
|
1764
1846
|
attr_reader closing_loc: Location
|
1765
1847
|
attr_reader block: Node?
|
1766
|
-
attr_reader flags: Integer
|
1767
1848
|
attr_reader operator_loc: Location
|
1768
1849
|
attr_reader value: Node
|
1769
1850
|
|
1770
|
-
def initialize: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?,
|
1851
|
+
def initialize: (flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator_loc: Location, value: Node, location: Location) -> void
|
1771
1852
|
def accept: (visitor: Visitor) -> void
|
1772
1853
|
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
1773
1854
|
def child_nodes: () -> Array[Node?]
|
@@ -1777,16 +1858,18 @@ module Prism
|
|
1777
1858
|
|
1778
1859
|
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
|
1779
1860
|
|
1861
|
+
def safe_navigation?: () -> bool
|
1862
|
+
|
1863
|
+
def variable_call?: () -> bool
|
1864
|
+
|
1865
|
+
def attribute_write?: () -> bool
|
1866
|
+
|
1780
1867
|
def call_operator: () -> String?
|
1781
1868
|
|
1782
1869
|
def opening: () -> String
|
1783
1870
|
|
1784
1871
|
def closing: () -> String
|
1785
1872
|
|
1786
|
-
def safe_navigation?: () -> bool
|
1787
|
-
|
1788
|
-
def variable_call?: () -> bool
|
1789
|
-
|
1790
1873
|
def operator: () -> String
|
1791
1874
|
|
1792
1875
|
def inspect: (inspector: NodeInspector) -> String
|
@@ -1796,18 +1879,18 @@ module Prism
|
|
1796
1879
|
# foo.bar[baz] += value
|
1797
1880
|
# ^^^^^^^^^^^^^^^^^^^^^
|
1798
1881
|
class IndexOperatorWriteNode < Node
|
1882
|
+
attr_reader flags: Integer
|
1799
1883
|
attr_reader receiver: Node?
|
1800
1884
|
attr_reader call_operator_loc: Location?
|
1801
1885
|
attr_reader opening_loc: Location
|
1802
1886
|
attr_reader arguments: ArgumentsNode?
|
1803
1887
|
attr_reader closing_loc: Location
|
1804
1888
|
attr_reader block: Node?
|
1805
|
-
attr_reader flags: Integer
|
1806
1889
|
attr_reader operator: Symbol
|
1807
1890
|
attr_reader operator_loc: Location
|
1808
1891
|
attr_reader value: Node
|
1809
1892
|
|
1810
|
-
def initialize: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?,
|
1893
|
+
def initialize: (flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> void
|
1811
1894
|
def accept: (visitor: Visitor) -> void
|
1812
1895
|
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
1813
1896
|
def child_nodes: () -> Array[Node?]
|
@@ -1817,16 +1900,18 @@ module Prism
|
|
1817
1900
|
|
1818
1901
|
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
|
1819
1902
|
|
1903
|
+
def safe_navigation?: () -> bool
|
1904
|
+
|
1905
|
+
def variable_call?: () -> bool
|
1906
|
+
|
1907
|
+
def attribute_write?: () -> bool
|
1908
|
+
|
1820
1909
|
def call_operator: () -> String?
|
1821
1910
|
|
1822
1911
|
def opening: () -> String
|
1823
1912
|
|
1824
1913
|
def closing: () -> String
|
1825
1914
|
|
1826
|
-
def safe_navigation?: () -> bool
|
1827
|
-
|
1828
|
-
def variable_call?: () -> bool
|
1829
|
-
|
1830
1915
|
def inspect: (inspector: NodeInspector) -> String
|
1831
1916
|
end
|
1832
1917
|
# Represents the use of the `||=` operator on a call to `[]`.
|
@@ -1834,17 +1919,17 @@ module Prism
|
|
1834
1919
|
# foo.bar[baz] ||= value
|
1835
1920
|
# ^^^^^^^^^^^^^^^^^^^^^^
|
1836
1921
|
class IndexOrWriteNode < Node
|
1922
|
+
attr_reader flags: Integer
|
1837
1923
|
attr_reader receiver: Node?
|
1838
1924
|
attr_reader call_operator_loc: Location?
|
1839
1925
|
attr_reader opening_loc: Location
|
1840
1926
|
attr_reader arguments: ArgumentsNode?
|
1841
1927
|
attr_reader closing_loc: Location
|
1842
1928
|
attr_reader block: Node?
|
1843
|
-
attr_reader flags: Integer
|
1844
1929
|
attr_reader operator_loc: Location
|
1845
1930
|
attr_reader value: Node
|
1846
1931
|
|
1847
|
-
def initialize: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?,
|
1932
|
+
def initialize: (flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator_loc: Location, value: Node, location: Location) -> void
|
1848
1933
|
def accept: (visitor: Visitor) -> void
|
1849
1934
|
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
1850
1935
|
def child_nodes: () -> Array[Node?]
|
@@ -1854,17 +1939,61 @@ module Prism
|
|
1854
1939
|
|
1855
1940
|
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
|
1856
1941
|
|
1942
|
+
def safe_navigation?: () -> bool
|
1943
|
+
|
1944
|
+
def variable_call?: () -> bool
|
1945
|
+
|
1946
|
+
def attribute_write?: () -> bool
|
1947
|
+
|
1857
1948
|
def call_operator: () -> String?
|
1858
1949
|
|
1859
1950
|
def opening: () -> String
|
1860
1951
|
|
1861
1952
|
def closing: () -> String
|
1862
1953
|
|
1954
|
+
def operator: () -> String
|
1955
|
+
|
1956
|
+
def inspect: (inspector: NodeInspector) -> String
|
1957
|
+
end
|
1958
|
+
# Represents assigning to an index.
|
1959
|
+
#
|
1960
|
+
# foo[bar], = 1
|
1961
|
+
# ^^^^^^^^
|
1962
|
+
#
|
1963
|
+
# begin
|
1964
|
+
# rescue => foo[bar]
|
1965
|
+
# ^^^^^^^^
|
1966
|
+
# end
|
1967
|
+
#
|
1968
|
+
# for foo[bar] in baz do end
|
1969
|
+
# ^^^^^^^^
|
1970
|
+
class IndexTargetNode < Node
|
1971
|
+
attr_reader flags: Integer
|
1972
|
+
attr_reader receiver: Node
|
1973
|
+
attr_reader opening_loc: Location
|
1974
|
+
attr_reader arguments: ArgumentsNode?
|
1975
|
+
attr_reader closing_loc: Location
|
1976
|
+
attr_reader block: Node?
|
1977
|
+
|
1978
|
+
def initialize: (flags: Integer, receiver: Node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, location: Location) -> void
|
1979
|
+
def accept: (visitor: Visitor) -> void
|
1980
|
+
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
1981
|
+
def child_nodes: () -> Array[Node?]
|
1982
|
+
def deconstruct: () -> Array[Node?]
|
1983
|
+
|
1984
|
+
def copy: (**untyped) -> IndexTargetNode
|
1985
|
+
|
1986
|
+
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
|
1987
|
+
|
1863
1988
|
def safe_navigation?: () -> bool
|
1864
1989
|
|
1865
1990
|
def variable_call?: () -> bool
|
1866
1991
|
|
1867
|
-
def
|
1992
|
+
def attribute_write?: () -> bool
|
1993
|
+
|
1994
|
+
def opening: () -> String
|
1995
|
+
|
1996
|
+
def closing: () -> String
|
1868
1997
|
|
1869
1998
|
def inspect: (inspector: NodeInspector) -> String
|
1870
1999
|
end
|
@@ -2020,10 +2149,10 @@ module Prism
|
|
2020
2149
|
|
2021
2150
|
def binary?: () -> bool
|
2022
2151
|
|
2023
|
-
def octal?: () -> bool
|
2024
|
-
|
2025
2152
|
def decimal?: () -> bool
|
2026
2153
|
|
2154
|
+
def octal?: () -> bool
|
2155
|
+
|
2027
2156
|
def hexadecimal?: () -> bool
|
2028
2157
|
|
2029
2158
|
def inspect: (inspector: NodeInspector) -> String
|
@@ -2035,12 +2164,12 @@ module Prism
|
|
2035
2164
|
# if /foo #{bar} baz/ then end
|
2036
2165
|
# ^^^^^^^^^^^^^^^^
|
2037
2166
|
class InterpolatedMatchLastLineNode < Node
|
2167
|
+
attr_reader flags: Integer
|
2038
2168
|
attr_reader opening_loc: Location
|
2039
2169
|
attr_reader parts: Array[Node]
|
2040
2170
|
attr_reader closing_loc: Location
|
2041
|
-
attr_reader flags: Integer
|
2042
2171
|
|
2043
|
-
def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location,
|
2172
|
+
def initialize: (flags: Integer, opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> void
|
2044
2173
|
def accept: (visitor: Visitor) -> void
|
2045
2174
|
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
2046
2175
|
def child_nodes: () -> Array[Node?]
|
@@ -2050,10 +2179,6 @@ module Prism
|
|
2050
2179
|
|
2051
2180
|
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
|
2052
2181
|
|
2053
|
-
def opening: () -> String
|
2054
|
-
|
2055
|
-
def closing: () -> String
|
2056
|
-
|
2057
2182
|
def ignore_case?: () -> bool
|
2058
2183
|
|
2059
2184
|
def extended?: () -> bool
|
@@ -2070,6 +2195,16 @@ module Prism
|
|
2070
2195
|
|
2071
2196
|
def utf_8?: () -> bool
|
2072
2197
|
|
2198
|
+
def forced_utf8_encoding?: () -> bool
|
2199
|
+
|
2200
|
+
def forced_binary_encoding?: () -> bool
|
2201
|
+
|
2202
|
+
def forced_us_ascii_encoding?: () -> bool
|
2203
|
+
|
2204
|
+
def opening: () -> String
|
2205
|
+
|
2206
|
+
def closing: () -> String
|
2207
|
+
|
2073
2208
|
def inspect: (inspector: NodeInspector) -> String
|
2074
2209
|
end
|
2075
2210
|
# Represents a regular expression literal that contains interpolation.
|
@@ -2077,12 +2212,12 @@ module Prism
|
|
2077
2212
|
# /foo #{bar} baz/
|
2078
2213
|
# ^^^^^^^^^^^^^^^^
|
2079
2214
|
class InterpolatedRegularExpressionNode < Node
|
2215
|
+
attr_reader flags: Integer
|
2080
2216
|
attr_reader opening_loc: Location
|
2081
2217
|
attr_reader parts: Array[Node]
|
2082
2218
|
attr_reader closing_loc: Location
|
2083
|
-
attr_reader flags: Integer
|
2084
2219
|
|
2085
|
-
def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location,
|
2220
|
+
def initialize: (flags: Integer, opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> void
|
2086
2221
|
def accept: (visitor: Visitor) -> void
|
2087
2222
|
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
2088
2223
|
def child_nodes: () -> Array[Node?]
|
@@ -2092,10 +2227,6 @@ module Prism
|
|
2092
2227
|
|
2093
2228
|
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
|
2094
2229
|
|
2095
|
-
def opening: () -> String
|
2096
|
-
|
2097
|
-
def closing: () -> String
|
2098
|
-
|
2099
2230
|
def ignore_case?: () -> bool
|
2100
2231
|
|
2101
2232
|
def extended?: () -> bool
|
@@ -2112,6 +2243,16 @@ module Prism
|
|
2112
2243
|
|
2113
2244
|
def utf_8?: () -> bool
|
2114
2245
|
|
2246
|
+
def forced_utf8_encoding?: () -> bool
|
2247
|
+
|
2248
|
+
def forced_binary_encoding?: () -> bool
|
2249
|
+
|
2250
|
+
def forced_us_ascii_encoding?: () -> bool
|
2251
|
+
|
2252
|
+
def opening: () -> String
|
2253
|
+
|
2254
|
+
def closing: () -> String
|
2255
|
+
|
2115
2256
|
def inspect: (inspector: NodeInspector) -> String
|
2116
2257
|
end
|
2117
2258
|
# Represents a string literal that contains interpolation.
|
@@ -2194,9 +2335,10 @@ module Prism
|
|
2194
2335
|
# foo(a: b)
|
2195
2336
|
# ^^^^
|
2196
2337
|
class KeywordHashNode < Node
|
2338
|
+
attr_reader flags: Integer
|
2197
2339
|
attr_reader elements: Array[Node]
|
2198
2340
|
|
2199
|
-
def initialize: (elements: Array[Node], location: Location) -> void
|
2341
|
+
def initialize: (flags: Integer, elements: Array[Node], location: Location) -> void
|
2200
2342
|
def accept: (visitor: Visitor) -> void
|
2201
2343
|
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
2202
2344
|
def child_nodes: () -> Array[Node?]
|
@@ -2206,6 +2348,8 @@ module Prism
|
|
2206
2348
|
|
2207
2349
|
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
|
2208
2350
|
|
2351
|
+
def static_keys?: () -> bool
|
2352
|
+
|
2209
2353
|
def inspect: (inspector: NodeInspector) -> String
|
2210
2354
|
end
|
2211
2355
|
# Represents a keyword rest parameter to a method, block, or lambda definition.
|
@@ -2238,13 +2382,14 @@ module Prism
|
|
2238
2382
|
# ^^^^^^^^^^^^^^^^^^^^^^^
|
2239
2383
|
class LambdaNode < Node
|
2240
2384
|
attr_reader locals: Array[Symbol]
|
2385
|
+
attr_reader locals_body_index: Integer
|
2241
2386
|
attr_reader operator_loc: Location
|
2242
2387
|
attr_reader opening_loc: Location
|
2243
2388
|
attr_reader closing_loc: Location
|
2244
|
-
attr_reader parameters:
|
2389
|
+
attr_reader parameters: Node?
|
2245
2390
|
attr_reader body: Node?
|
2246
2391
|
|
2247
|
-
def initialize: (locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters:
|
2392
|
+
def initialize: (locals: Array[Symbol], locals_body_index: Integer, operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: Node?, body: Node?, location: Location) -> void
|
2248
2393
|
def accept: (visitor: Visitor) -> void
|
2249
2394
|
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
2250
2395
|
def child_nodes: () -> Array[Node?]
|
@@ -2410,13 +2555,13 @@ module Prism
|
|
2410
2555
|
# if /foo/i then end
|
2411
2556
|
# ^^^^^^
|
2412
2557
|
class MatchLastLineNode < Node
|
2558
|
+
attr_reader flags: Integer
|
2413
2559
|
attr_reader opening_loc: Location
|
2414
2560
|
attr_reader content_loc: Location
|
2415
2561
|
attr_reader closing_loc: Location
|
2416
2562
|
attr_reader unescaped: String
|
2417
|
-
attr_reader flags: Integer
|
2418
2563
|
|
2419
|
-
def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String,
|
2564
|
+
def initialize: (flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> void
|
2420
2565
|
def accept: (visitor: Visitor) -> void
|
2421
2566
|
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
2422
2567
|
def child_nodes: () -> Array[Node?]
|
@@ -2426,12 +2571,6 @@ module Prism
|
|
2426
2571
|
|
2427
2572
|
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
|
2428
2573
|
|
2429
|
-
def opening: () -> String
|
2430
|
-
|
2431
|
-
def content: () -> String
|
2432
|
-
|
2433
|
-
def closing: () -> String
|
2434
|
-
|
2435
2574
|
def ignore_case?: () -> bool
|
2436
2575
|
|
2437
2576
|
def extended?: () -> bool
|
@@ -2448,6 +2587,18 @@ module Prism
|
|
2448
2587
|
|
2449
2588
|
def utf_8?: () -> bool
|
2450
2589
|
|
2590
|
+
def forced_utf8_encoding?: () -> bool
|
2591
|
+
|
2592
|
+
def forced_binary_encoding?: () -> bool
|
2593
|
+
|
2594
|
+
def forced_us_ascii_encoding?: () -> bool
|
2595
|
+
|
2596
|
+
def opening: () -> String
|
2597
|
+
|
2598
|
+
def content: () -> String
|
2599
|
+
|
2600
|
+
def closing: () -> String
|
2601
|
+
|
2451
2602
|
def inspect: (inspector: NodeInspector) -> String
|
2452
2603
|
end
|
2453
2604
|
# Represents the use of the modifier `in` operator.
|
@@ -2684,6 +2835,26 @@ module Prism
|
|
2684
2835
|
|
2685
2836
|
def inspect: (inspector: NodeInspector) -> String
|
2686
2837
|
end
|
2838
|
+
# Represents an implicit set of parameters through the use of numbered
|
2839
|
+
# parameters within a block or lambda.
|
2840
|
+
#
|
2841
|
+
# -> { _1 + _2 }
|
2842
|
+
# ^^^^^^^^^^^^^^
|
2843
|
+
class NumberedParametersNode < Node
|
2844
|
+
attr_reader maximum: Integer
|
2845
|
+
|
2846
|
+
def initialize: (maximum: Integer, location: Location) -> void
|
2847
|
+
def accept: (visitor: Visitor) -> void
|
2848
|
+
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
2849
|
+
def child_nodes: () -> Array[Node?]
|
2850
|
+
def deconstruct: () -> Array[Node?]
|
2851
|
+
|
2852
|
+
def copy: (**untyped) -> NumberedParametersNode
|
2853
|
+
|
2854
|
+
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
|
2855
|
+
|
2856
|
+
def inspect: (inspector: NodeInspector) -> String
|
2857
|
+
end
|
2687
2858
|
# Represents reading a numbered reference to a capture in the previous match.
|
2688
2859
|
#
|
2689
2860
|
# $1
|
@@ -2781,13 +2952,13 @@ module Prism
|
|
2781
2952
|
class ParametersNode < Node
|
2782
2953
|
attr_reader requireds: Array[Node]
|
2783
2954
|
attr_reader optionals: Array[Node]
|
2784
|
-
attr_reader rest:
|
2955
|
+
attr_reader rest: Node?
|
2785
2956
|
attr_reader posts: Array[Node]
|
2786
2957
|
attr_reader keywords: Array[Node]
|
2787
2958
|
attr_reader keyword_rest: Node?
|
2788
2959
|
attr_reader block: BlockParameterNode?
|
2789
2960
|
|
2790
|
-
def initialize: (requireds: Array[Node], optionals: Array[Node], rest:
|
2961
|
+
def initialize: (requireds: Array[Node], optionals: Array[Node], rest: Node?, posts: Array[Node], keywords: Array[Node], keyword_rest: Node?, block: BlockParameterNode?, location: Location) -> void
|
2791
2962
|
def accept: (visitor: Visitor) -> void
|
2792
2963
|
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
2793
2964
|
def child_nodes: () -> Array[Node?]
|
@@ -2957,12 +3128,12 @@ module Prism
|
|
2957
3128
|
# c if a =~ /left/ ... b =~ /right/
|
2958
3129
|
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2959
3130
|
class RangeNode < Node
|
3131
|
+
attr_reader flags: Integer
|
2960
3132
|
attr_reader left: Node?
|
2961
3133
|
attr_reader right: Node?
|
2962
3134
|
attr_reader operator_loc: Location
|
2963
|
-
attr_reader flags: Integer
|
2964
3135
|
|
2965
|
-
def initialize: (left: Node?, right: Node?, operator_loc: Location,
|
3136
|
+
def initialize: (flags: Integer, left: Node?, right: Node?, operator_loc: Location, location: Location) -> void
|
2966
3137
|
def accept: (visitor: Visitor) -> void
|
2967
3138
|
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
2968
3139
|
def child_nodes: () -> Array[Node?]
|
@@ -2972,10 +3143,10 @@ module Prism
|
|
2972
3143
|
|
2973
3144
|
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
|
2974
3145
|
|
2975
|
-
def operator: () -> String
|
2976
|
-
|
2977
3146
|
def exclude_end?: () -> bool
|
2978
3147
|
|
3148
|
+
def operator: () -> String
|
3149
|
+
|
2979
3150
|
def inspect: (inspector: NodeInspector) -> String
|
2980
3151
|
end
|
2981
3152
|
# Represents a rational number literal.
|
@@ -3020,13 +3191,13 @@ module Prism
|
|
3020
3191
|
# /foo/i
|
3021
3192
|
# ^^^^^^
|
3022
3193
|
class RegularExpressionNode < Node
|
3194
|
+
attr_reader flags: Integer
|
3023
3195
|
attr_reader opening_loc: Location
|
3024
3196
|
attr_reader content_loc: Location
|
3025
3197
|
attr_reader closing_loc: Location
|
3026
3198
|
attr_reader unescaped: String
|
3027
|
-
attr_reader flags: Integer
|
3028
3199
|
|
3029
|
-
def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String,
|
3200
|
+
def initialize: (flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> void
|
3030
3201
|
def accept: (visitor: Visitor) -> void
|
3031
3202
|
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
3032
3203
|
def child_nodes: () -> Array[Node?]
|
@@ -3036,12 +3207,6 @@ module Prism
|
|
3036
3207
|
|
3037
3208
|
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
|
3038
3209
|
|
3039
|
-
def opening: () -> String
|
3040
|
-
|
3041
|
-
def content: () -> String
|
3042
|
-
|
3043
|
-
def closing: () -> String
|
3044
|
-
|
3045
3210
|
def ignore_case?: () -> bool
|
3046
3211
|
|
3047
3212
|
def extended?: () -> bool
|
@@ -3058,6 +3223,18 @@ module Prism
|
|
3058
3223
|
|
3059
3224
|
def utf_8?: () -> bool
|
3060
3225
|
|
3226
|
+
def forced_utf8_encoding?: () -> bool
|
3227
|
+
|
3228
|
+
def forced_binary_encoding?: () -> bool
|
3229
|
+
|
3230
|
+
def forced_us_ascii_encoding?: () -> bool
|
3231
|
+
|
3232
|
+
def opening: () -> String
|
3233
|
+
|
3234
|
+
def content: () -> String
|
3235
|
+
|
3236
|
+
def closing: () -> String
|
3237
|
+
|
3061
3238
|
def inspect: (inspector: NodeInspector) -> String
|
3062
3239
|
end
|
3063
3240
|
# Represents a required keyword parameter to a method, block, or lambda definition.
|
@@ -3394,6 +3571,10 @@ module Prism
|
|
3394
3571
|
|
3395
3572
|
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
|
3396
3573
|
|
3574
|
+
def forced_utf8_encoding?: () -> bool
|
3575
|
+
|
3576
|
+
def forced_binary_encoding?: () -> bool
|
3577
|
+
|
3397
3578
|
def frozen?: () -> bool
|
3398
3579
|
|
3399
3580
|
def opening: () -> String?
|
@@ -3444,12 +3625,13 @@ module Prism
|
|
3444
3625
|
# %i[foo]
|
3445
3626
|
# ^^^
|
3446
3627
|
class SymbolNode < Node
|
3628
|
+
attr_reader flags: Integer
|
3447
3629
|
attr_reader opening_loc: Location?
|
3448
3630
|
attr_reader value_loc: Location?
|
3449
3631
|
attr_reader closing_loc: Location?
|
3450
3632
|
attr_reader unescaped: String
|
3451
3633
|
|
3452
|
-
def initialize: (opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location) -> void
|
3634
|
+
def initialize: (flags: Integer, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location) -> void
|
3453
3635
|
def accept: (visitor: Visitor) -> void
|
3454
3636
|
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
3455
3637
|
def child_nodes: () -> Array[Node?]
|
@@ -3459,6 +3641,12 @@ module Prism
|
|
3459
3641
|
|
3460
3642
|
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
|
3461
3643
|
|
3644
|
+
def forced_utf8_encoding?: () -> bool
|
3645
|
+
|
3646
|
+
def forced_binary_encoding?: () -> bool
|
3647
|
+
|
3648
|
+
def forced_us_ascii_encoding?: () -> bool
|
3649
|
+
|
3462
3650
|
def opening: () -> String?
|
3463
3651
|
|
3464
3652
|
def value: () -> String?
|
@@ -3548,13 +3736,13 @@ module Prism
|
|
3548
3736
|
# until foo do bar end
|
3549
3737
|
# ^^^^^^^^^^^^^^^^^^^^
|
3550
3738
|
class UntilNode < Node
|
3739
|
+
attr_reader flags: Integer
|
3551
3740
|
attr_reader keyword_loc: Location
|
3552
3741
|
attr_reader closing_loc: Location?
|
3553
3742
|
attr_reader predicate: Node
|
3554
3743
|
attr_reader statements: StatementsNode?
|
3555
|
-
attr_reader flags: Integer
|
3556
3744
|
|
3557
|
-
def initialize: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?,
|
3745
|
+
def initialize: (flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, location: Location) -> void
|
3558
3746
|
def accept: (visitor: Visitor) -> void
|
3559
3747
|
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
3560
3748
|
def child_nodes: () -> Array[Node?]
|
@@ -3564,12 +3752,12 @@ module Prism
|
|
3564
3752
|
|
3565
3753
|
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
|
3566
3754
|
|
3755
|
+
def begin_modifier?: () -> bool
|
3756
|
+
|
3567
3757
|
def keyword: () -> String
|
3568
3758
|
|
3569
3759
|
def closing: () -> String?
|
3570
3760
|
|
3571
|
-
def begin_modifier?: () -> bool
|
3572
|
-
|
3573
3761
|
def inspect: (inspector: NodeInspector) -> String
|
3574
3762
|
end
|
3575
3763
|
# Represents the use of the `when` keyword within a case statement.
|
@@ -3605,13 +3793,13 @@ module Prism
|
|
3605
3793
|
# while foo do bar end
|
3606
3794
|
# ^^^^^^^^^^^^^^^^^^^^
|
3607
3795
|
class WhileNode < Node
|
3796
|
+
attr_reader flags: Integer
|
3608
3797
|
attr_reader keyword_loc: Location
|
3609
3798
|
attr_reader closing_loc: Location?
|
3610
3799
|
attr_reader predicate: Node
|
3611
3800
|
attr_reader statements: StatementsNode?
|
3612
|
-
attr_reader flags: Integer
|
3613
3801
|
|
3614
|
-
def initialize: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?,
|
3802
|
+
def initialize: (flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, location: Location) -> void
|
3615
3803
|
def accept: (visitor: Visitor) -> void
|
3616
3804
|
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
3617
3805
|
def child_nodes: () -> Array[Node?]
|
@@ -3621,12 +3809,12 @@ module Prism
|
|
3621
3809
|
|
3622
3810
|
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
|
3623
3811
|
|
3812
|
+
def begin_modifier?: () -> bool
|
3813
|
+
|
3624
3814
|
def keyword: () -> String
|
3625
3815
|
|
3626
3816
|
def closing: () -> String?
|
3627
3817
|
|
3628
|
-
def begin_modifier?: () -> bool
|
3629
|
-
|
3630
3818
|
def inspect: (inspector: NodeInspector) -> String
|
3631
3819
|
end
|
3632
3820
|
# Represents an xstring literal with no interpolation.
|
@@ -3634,12 +3822,13 @@ module Prism
|
|
3634
3822
|
# `foo`
|
3635
3823
|
# ^^^^^
|
3636
3824
|
class XStringNode < Node
|
3825
|
+
attr_reader flags: Integer
|
3637
3826
|
attr_reader opening_loc: Location
|
3638
3827
|
attr_reader content_loc: Location
|
3639
3828
|
attr_reader closing_loc: Location
|
3640
3829
|
attr_reader unescaped: String
|
3641
3830
|
|
3642
|
-
def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> void
|
3831
|
+
def initialize: (flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> void
|
3643
3832
|
def accept: (visitor: Visitor) -> void
|
3644
3833
|
def set_newline_flag: (newline_marked: Array[bool]) -> void
|
3645
3834
|
def child_nodes: () -> Array[Node?]
|
@@ -3649,6 +3838,10 @@ module Prism
|
|
3649
3838
|
|
3650
3839
|
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
|
3651
3840
|
|
3841
|
+
def forced_utf8_encoding?: () -> bool
|
3842
|
+
|
3843
|
+
def forced_binary_encoding?: () -> bool
|
3844
|
+
|
3652
3845
|
def opening: () -> String
|
3653
3846
|
|
3654
3847
|
def content: () -> String
|
@@ -3689,7 +3882,13 @@ module Prism
|
|
3689
3882
|
# Flags for arguments nodes.
|
3690
3883
|
module ArgumentsNodeFlags
|
3691
3884
|
# if arguments contain keyword splat
|
3692
|
-
|
3885
|
+
CONTAINS_KEYWORD_SPLAT: Integer
|
3886
|
+
end
|
3887
|
+
|
3888
|
+
# Flags for array nodes.
|
3889
|
+
module ArrayNodeFlags
|
3890
|
+
# if array contains splat nodes
|
3891
|
+
CONTAINS_SPLAT: Integer
|
3693
3892
|
end
|
3694
3893
|
|
3695
3894
|
# Flags for call nodes.
|
@@ -3698,20 +3897,36 @@ module Prism
|
|
3698
3897
|
SAFE_NAVIGATION: Integer
|
3699
3898
|
# a call that could have been a local variable
|
3700
3899
|
VARIABLE_CALL: Integer
|
3900
|
+
# a call that is an attribute write, so the value being written should be returned
|
3901
|
+
ATTRIBUTE_WRITE: Integer
|
3902
|
+
end
|
3903
|
+
|
3904
|
+
# Flags for nodes that have unescaped content.
|
3905
|
+
module EncodingFlags
|
3906
|
+
# internal bytes forced the encoding to UTF-8
|
3907
|
+
FORCED_UTF8_ENCODING: Integer
|
3908
|
+
# internal bytes forced the encoding to binary
|
3909
|
+
FORCED_BINARY_ENCODING: Integer
|
3701
3910
|
end
|
3702
3911
|
|
3703
3912
|
# Flags for integer nodes that correspond to the base of the integer.
|
3704
3913
|
module IntegerBaseFlags
|
3705
3914
|
# 0b prefix
|
3706
3915
|
BINARY: Integer
|
3707
|
-
# 0o or 0 prefix
|
3708
|
-
OCTAL: Integer
|
3709
3916
|
# 0d or no prefix
|
3710
3917
|
DECIMAL: Integer
|
3918
|
+
# 0o or 0 prefix
|
3919
|
+
OCTAL: Integer
|
3711
3920
|
# 0x prefix
|
3712
3921
|
HEXADECIMAL: Integer
|
3713
3922
|
end
|
3714
3923
|
|
3924
|
+
# Flags for keyword hash nodes.
|
3925
|
+
module KeywordHashNodeFlags
|
3926
|
+
# a keyword hash which only has `AssocNode` elements all with static literal keys, which means the elements can be treated as keyword arguments
|
3927
|
+
STATIC_KEYS: Integer
|
3928
|
+
end
|
3929
|
+
|
3715
3930
|
# Flags for while and until loop nodes.
|
3716
3931
|
module LoopFlags
|
3717
3932
|
# a loop after a begin statement, so the body is executed first before the condition
|
@@ -3742,14 +3957,34 @@ module Prism
|
|
3742
3957
|
WINDOWS_31J: Integer
|
3743
3958
|
# u - forces the UTF-8 encoding
|
3744
3959
|
UTF_8: Integer
|
3960
|
+
# internal bytes forced the encoding to UTF-8
|
3961
|
+
FORCED_UTF8_ENCODING: Integer
|
3962
|
+
# internal bytes forced the encoding to binary
|
3963
|
+
FORCED_BINARY_ENCODING: Integer
|
3964
|
+
# internal bytes forced the encoding to US-ASCII
|
3965
|
+
FORCED_US_ASCII_ENCODING: Integer
|
3745
3966
|
end
|
3746
3967
|
|
3747
3968
|
# Flags for string nodes.
|
3748
3969
|
module StringFlags
|
3970
|
+
# internal bytes forced the encoding to UTF-8
|
3971
|
+
FORCED_UTF8_ENCODING: Integer
|
3972
|
+
# internal bytes forced the encoding to binary
|
3973
|
+
FORCED_BINARY_ENCODING: Integer
|
3749
3974
|
# frozen by virtue of a `frozen_string_literal` comment
|
3750
3975
|
FROZEN: Integer
|
3751
3976
|
end
|
3752
3977
|
|
3978
|
+
# Flags for symbol nodes.
|
3979
|
+
module SymbolFlags
|
3980
|
+
# internal bytes forced the encoding to UTF-8
|
3981
|
+
FORCED_UTF8_ENCODING: Integer
|
3982
|
+
# internal bytes forced the encoding to binary
|
3983
|
+
FORCED_BINARY_ENCODING: Integer
|
3984
|
+
# internal bytes forced the encoding to US-ASCII
|
3985
|
+
FORCED_US_ASCII_ENCODING: Integer
|
3986
|
+
end
|
3987
|
+
|
3753
3988
|
|
3754
3989
|
class Visitor < BasicVisitor
|
3755
3990
|
# Visit a AliasGlobalVariableNode node
|
@@ -3815,6 +4050,9 @@ module Prism
|
|
3815
4050
|
# Visit a CallOrWriteNode node
|
3816
4051
|
def visit_call_or_write_node: (node: CallOrWriteNode) -> void
|
3817
4052
|
|
4053
|
+
# Visit a CallTargetNode node
|
4054
|
+
def visit_call_target_node: (node: CallTargetNode) -> void
|
4055
|
+
|
3818
4056
|
# Visit a CapturePatternNode node
|
3819
4057
|
def visit_capture_pattern_node: (node: CapturePatternNode) -> void
|
3820
4058
|
|
@@ -3956,6 +4194,9 @@ module Prism
|
|
3956
4194
|
# Visit a ImplicitNode node
|
3957
4195
|
def visit_implicit_node: (node: ImplicitNode) -> void
|
3958
4196
|
|
4197
|
+
# Visit a ImplicitRestNode node
|
4198
|
+
def visit_implicit_rest_node: (node: ImplicitRestNode) -> void
|
4199
|
+
|
3959
4200
|
# Visit a InNode node
|
3960
4201
|
def visit_in_node: (node: InNode) -> void
|
3961
4202
|
|
@@ -3968,6 +4209,9 @@ module Prism
|
|
3968
4209
|
# Visit a IndexOrWriteNode node
|
3969
4210
|
def visit_index_or_write_node: (node: IndexOrWriteNode) -> void
|
3970
4211
|
|
4212
|
+
# Visit a IndexTargetNode node
|
4213
|
+
def visit_index_target_node: (node: IndexTargetNode) -> void
|
4214
|
+
|
3971
4215
|
# Visit a InstanceVariableAndWriteNode node
|
3972
4216
|
def visit_instance_variable_and_write_node: (node: InstanceVariableAndWriteNode) -> void
|
3973
4217
|
|
@@ -4064,6 +4308,9 @@ module Prism
|
|
4064
4308
|
# Visit a NoKeywordsParameterNode node
|
4065
4309
|
def visit_no_keywords_parameter_node: (node: NoKeywordsParameterNode) -> void
|
4066
4310
|
|
4311
|
+
# Visit a NumberedParametersNode node
|
4312
|
+
def visit_numbered_parameters_node: (node: NumberedParametersNode) -> void
|
4313
|
+
|
4067
4314
|
# Visit a NumberedReferenceReadNode node
|
4068
4315
|
def visit_numbered_reference_read_node: (node: NumberedReferenceReadNode) -> void
|
4069
4316
|
|
@@ -4200,9 +4447,9 @@ module Prism
|
|
4200
4447
|
# Create a new AndNode node
|
4201
4448
|
def AndNode: (left: Node, right: Node, operator_loc: Location, location: Location) -> AndNode
|
4202
4449
|
# Create a new ArgumentsNode node
|
4203
|
-
def ArgumentsNode: (arguments: Array[Node],
|
4450
|
+
def ArgumentsNode: (flags: Integer, arguments: Array[Node], location: Location) -> ArgumentsNode
|
4204
4451
|
# Create a new ArrayNode node
|
4205
|
-
def ArrayNode: (elements: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> ArrayNode
|
4452
|
+
def ArrayNode: (flags: Integer, elements: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> ArrayNode
|
4206
4453
|
# Create a new ArrayPatternNode node
|
4207
4454
|
def ArrayPatternNode: (constant: Node?, requireds: Array[Node], rest: Node?, posts: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> ArrayPatternNode
|
4208
4455
|
# Create a new AssocNode node
|
@@ -4218,7 +4465,7 @@ module Prism
|
|
4218
4465
|
# Create a new BlockLocalVariableNode node
|
4219
4466
|
def BlockLocalVariableNode: (name: Symbol, location: Location) -> BlockLocalVariableNode
|
4220
4467
|
# Create a new BlockNode node
|
4221
|
-
def BlockNode: (locals: Array[Symbol], parameters:
|
4468
|
+
def BlockNode: (locals: Array[Symbol], locals_body_index: Integer, parameters: Node?, body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> BlockNode
|
4222
4469
|
# Create a new BlockParameterNode node
|
4223
4470
|
def BlockParameterNode: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> BlockParameterNode
|
4224
4471
|
# Create a new BlockParametersNode node
|
@@ -4226,13 +4473,15 @@ module Prism
|
|
4226
4473
|
# Create a new BreakNode node
|
4227
4474
|
def BreakNode: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> BreakNode
|
4228
4475
|
# Create a new CallAndWriteNode node
|
4229
|
-
def CallAndWriteNode: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?,
|
4476
|
+
def CallAndWriteNode: (flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> CallAndWriteNode
|
4230
4477
|
# Create a new CallNode node
|
4231
|
-
def CallNode: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Node?,
|
4478
|
+
def CallNode: (flags: Integer, receiver: Node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Node?, location: Location) -> CallNode
|
4232
4479
|
# Create a new CallOperatorWriteNode node
|
4233
|
-
def CallOperatorWriteNode: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?,
|
4480
|
+
def CallOperatorWriteNode: (flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> CallOperatorWriteNode
|
4234
4481
|
# Create a new CallOrWriteNode node
|
4235
|
-
def CallOrWriteNode: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?,
|
4482
|
+
def CallOrWriteNode: (flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> CallOrWriteNode
|
4483
|
+
# Create a new CallTargetNode node
|
4484
|
+
def CallTargetNode: (flags: Integer, receiver: Node, call_operator_loc: Location, name: Symbol, message_loc: Location, location: Location) -> CallTargetNode
|
4236
4485
|
# Create a new CapturePatternNode node
|
4237
4486
|
def CapturePatternNode: (value: Node, target: Node, operator_loc: Location, location: Location) -> CapturePatternNode
|
4238
4487
|
# Create a new CaseMatchNode node
|
@@ -4278,7 +4527,7 @@ module Prism
|
|
4278
4527
|
# Create a new ConstantWriteNode node
|
4279
4528
|
def ConstantWriteNode: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> ConstantWriteNode
|
4280
4529
|
# Create a new DefNode node
|
4281
|
-
def DefNode: (name: Symbol, name_loc: Location, receiver: Node?, parameters: ParametersNode?, body: Node?, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location) -> DefNode
|
4530
|
+
def DefNode: (name: Symbol, name_loc: Location, receiver: Node?, parameters: ParametersNode?, body: Node?, locals: Array[Symbol], locals_body_index: Integer, def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location) -> DefNode
|
4282
4531
|
# Create a new DefinedNode node
|
4283
4532
|
def DefinedNode: (lparen_loc: Location?, value: Node, rparen_loc: Location?, keyword_loc: Location, location: Location) -> DefinedNode
|
4284
4533
|
# Create a new ElseNode node
|
@@ -4294,7 +4543,7 @@ module Prism
|
|
4294
4543
|
# Create a new FindPatternNode node
|
4295
4544
|
def FindPatternNode: (constant: Node?, left: Node, requireds: Array[Node], right: Node, opening_loc: Location?, closing_loc: Location?, location: Location) -> FindPatternNode
|
4296
4545
|
# Create a new FlipFlopNode node
|
4297
|
-
def FlipFlopNode: (left: Node?, right: Node?, operator_loc: Location,
|
4546
|
+
def FlipFlopNode: (flags: Integer, left: Node?, right: Node?, operator_loc: Location, location: Location) -> FlipFlopNode
|
4298
4547
|
# Create a new FloatNode node
|
4299
4548
|
def FloatNode: (location: Location) -> FloatNode
|
4300
4549
|
# Create a new ForNode node
|
@@ -4327,14 +4576,18 @@ module Prism
|
|
4327
4576
|
def ImaginaryNode: (numeric: Node, location: Location) -> ImaginaryNode
|
4328
4577
|
# Create a new ImplicitNode node
|
4329
4578
|
def ImplicitNode: (value: Node, location: Location) -> ImplicitNode
|
4579
|
+
# Create a new ImplicitRestNode node
|
4580
|
+
def ImplicitRestNode: (location: Location) -> ImplicitRestNode
|
4330
4581
|
# Create a new InNode node
|
4331
4582
|
def InNode: (pattern: Node, statements: StatementsNode?, in_loc: Location, then_loc: Location?, location: Location) -> InNode
|
4332
4583
|
# Create a new IndexAndWriteNode node
|
4333
|
-
def IndexAndWriteNode: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?,
|
4584
|
+
def IndexAndWriteNode: (flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator_loc: Location, value: Node, location: Location) -> IndexAndWriteNode
|
4334
4585
|
# Create a new IndexOperatorWriteNode node
|
4335
|
-
def IndexOperatorWriteNode: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?,
|
4586
|
+
def IndexOperatorWriteNode: (flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> IndexOperatorWriteNode
|
4336
4587
|
# Create a new IndexOrWriteNode node
|
4337
|
-
def IndexOrWriteNode: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?,
|
4588
|
+
def IndexOrWriteNode: (flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator_loc: Location, value: Node, location: Location) -> IndexOrWriteNode
|
4589
|
+
# Create a new IndexTargetNode node
|
4590
|
+
def IndexTargetNode: (flags: Integer, receiver: Node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, location: Location) -> IndexTargetNode
|
4338
4591
|
# Create a new InstanceVariableAndWriteNode node
|
4339
4592
|
def InstanceVariableAndWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> InstanceVariableAndWriteNode
|
4340
4593
|
# Create a new InstanceVariableOperatorWriteNode node
|
@@ -4350,9 +4603,9 @@ module Prism
|
|
4350
4603
|
# Create a new IntegerNode node
|
4351
4604
|
def IntegerNode: (flags: Integer, location: Location) -> IntegerNode
|
4352
4605
|
# Create a new InterpolatedMatchLastLineNode node
|
4353
|
-
def InterpolatedMatchLastLineNode: (opening_loc: Location, parts: Array[Node], closing_loc: Location,
|
4606
|
+
def InterpolatedMatchLastLineNode: (flags: Integer, opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> InterpolatedMatchLastLineNode
|
4354
4607
|
# Create a new InterpolatedRegularExpressionNode node
|
4355
|
-
def InterpolatedRegularExpressionNode: (opening_loc: Location, parts: Array[Node], closing_loc: Location,
|
4608
|
+
def InterpolatedRegularExpressionNode: (flags: Integer, opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> InterpolatedRegularExpressionNode
|
4356
4609
|
# Create a new InterpolatedStringNode node
|
4357
4610
|
def InterpolatedStringNode: (opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location) -> InterpolatedStringNode
|
4358
4611
|
# Create a new InterpolatedSymbolNode node
|
@@ -4360,11 +4613,11 @@ module Prism
|
|
4360
4613
|
# Create a new InterpolatedXStringNode node
|
4361
4614
|
def InterpolatedXStringNode: (opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> InterpolatedXStringNode
|
4362
4615
|
# Create a new KeywordHashNode node
|
4363
|
-
def KeywordHashNode: (elements: Array[Node], location: Location) -> KeywordHashNode
|
4616
|
+
def KeywordHashNode: (flags: Integer, elements: Array[Node], location: Location) -> KeywordHashNode
|
4364
4617
|
# Create a new KeywordRestParameterNode node
|
4365
4618
|
def KeywordRestParameterNode: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> KeywordRestParameterNode
|
4366
4619
|
# Create a new LambdaNode node
|
4367
|
-
def LambdaNode: (locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters:
|
4620
|
+
def LambdaNode: (locals: Array[Symbol], locals_body_index: Integer, operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: Node?, body: Node?, location: Location) -> LambdaNode
|
4368
4621
|
# Create a new LocalVariableAndWriteNode node
|
4369
4622
|
def LocalVariableAndWriteNode: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> LocalVariableAndWriteNode
|
4370
4623
|
# Create a new LocalVariableOperatorWriteNode node
|
@@ -4378,7 +4631,7 @@ module Prism
|
|
4378
4631
|
# Create a new LocalVariableWriteNode node
|
4379
4632
|
def LocalVariableWriteNode: (name: Symbol, depth: Integer, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> LocalVariableWriteNode
|
4380
4633
|
# Create a new MatchLastLineNode node
|
4381
|
-
def MatchLastLineNode: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String,
|
4634
|
+
def MatchLastLineNode: (flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> MatchLastLineNode
|
4382
4635
|
# Create a new MatchPredicateNode node
|
4383
4636
|
def MatchPredicateNode: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> MatchPredicateNode
|
4384
4637
|
# Create a new MatchRequiredNode node
|
@@ -4399,6 +4652,8 @@ module Prism
|
|
4399
4652
|
def NilNode: (location: Location) -> NilNode
|
4400
4653
|
# Create a new NoKeywordsParameterNode node
|
4401
4654
|
def NoKeywordsParameterNode: (operator_loc: Location, keyword_loc: Location, location: Location) -> NoKeywordsParameterNode
|
4655
|
+
# Create a new NumberedParametersNode node
|
4656
|
+
def NumberedParametersNode: (maximum: Integer, location: Location) -> NumberedParametersNode
|
4402
4657
|
# Create a new NumberedReferenceReadNode node
|
4403
4658
|
def NumberedReferenceReadNode: (number: Integer, location: Location) -> NumberedReferenceReadNode
|
4404
4659
|
# Create a new OptionalKeywordParameterNode node
|
@@ -4408,7 +4663,7 @@ module Prism
|
|
4408
4663
|
# Create a new OrNode node
|
4409
4664
|
def OrNode: (left: Node, right: Node, operator_loc: Location, location: Location) -> OrNode
|
4410
4665
|
# Create a new ParametersNode node
|
4411
|
-
def ParametersNode: (requireds: Array[Node], optionals: Array[Node], rest:
|
4666
|
+
def ParametersNode: (requireds: Array[Node], optionals: Array[Node], rest: Node?, posts: Array[Node], keywords: Array[Node], keyword_rest: Node?, block: BlockParameterNode?, location: Location) -> ParametersNode
|
4412
4667
|
# Create a new ParenthesesNode node
|
4413
4668
|
def ParenthesesNode: (body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> ParenthesesNode
|
4414
4669
|
# Create a new PinnedExpressionNode node
|
@@ -4422,13 +4677,13 @@ module Prism
|
|
4422
4677
|
# Create a new ProgramNode node
|
4423
4678
|
def ProgramNode: (locals: Array[Symbol], statements: StatementsNode, location: Location) -> ProgramNode
|
4424
4679
|
# Create a new RangeNode node
|
4425
|
-
def RangeNode: (left: Node?, right: Node?, operator_loc: Location,
|
4680
|
+
def RangeNode: (flags: Integer, left: Node?, right: Node?, operator_loc: Location, location: Location) -> RangeNode
|
4426
4681
|
# Create a new RationalNode node
|
4427
4682
|
def RationalNode: (numeric: Node, location: Location) -> RationalNode
|
4428
4683
|
# Create a new RedoNode node
|
4429
4684
|
def RedoNode: (location: Location) -> RedoNode
|
4430
4685
|
# Create a new RegularExpressionNode node
|
4431
|
-
def RegularExpressionNode: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String,
|
4686
|
+
def RegularExpressionNode: (flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> RegularExpressionNode
|
4432
4687
|
# Create a new RequiredKeywordParameterNode node
|
4433
4688
|
def RequiredKeywordParameterNode: (name: Symbol, name_loc: Location, location: Location) -> RequiredKeywordParameterNode
|
4434
4689
|
# Create a new RequiredParameterNode node
|
@@ -4462,7 +4717,7 @@ module Prism
|
|
4462
4717
|
# Create a new SuperNode node
|
4463
4718
|
def SuperNode: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: Node?, location: Location) -> SuperNode
|
4464
4719
|
# Create a new SymbolNode node
|
4465
|
-
def SymbolNode: (opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location) -> SymbolNode
|
4720
|
+
def SymbolNode: (flags: Integer, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location) -> SymbolNode
|
4466
4721
|
# Create a new TrueNode node
|
4467
4722
|
def TrueNode: (location: Location) -> TrueNode
|
4468
4723
|
# Create a new UndefNode node
|
@@ -4470,13 +4725,13 @@ module Prism
|
|
4470
4725
|
# Create a new UnlessNode node
|
4471
4726
|
def UnlessNode: (keyword_loc: Location, predicate: Node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location) -> UnlessNode
|
4472
4727
|
# Create a new UntilNode node
|
4473
|
-
def UntilNode: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?,
|
4728
|
+
def UntilNode: (flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, location: Location) -> UntilNode
|
4474
4729
|
# Create a new WhenNode node
|
4475
4730
|
def WhenNode: (keyword_loc: Location, conditions: Array[Node], statements: StatementsNode?, location: Location) -> WhenNode
|
4476
4731
|
# Create a new WhileNode node
|
4477
|
-
def WhileNode: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?,
|
4732
|
+
def WhileNode: (flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, location: Location) -> WhileNode
|
4478
4733
|
# Create a new XStringNode node
|
4479
|
-
def XStringNode: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> XStringNode
|
4734
|
+
def XStringNode: (flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> XStringNode
|
4480
4735
|
# Create a new YieldNode node
|
4481
4736
|
def YieldNode: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, location: Location) -> YieldNode
|
4482
4737
|
end
|