We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2a5c4a2 commit 3459901Copy full SHA for 3459901
lib/syntax_tree/parser.rb
@@ -761,8 +761,14 @@ def on_break(arguments)
761
# (:call | Backtick | Const | Ident | Op) message
762
# ) -> Call
763
def on_call(receiver, operator, message)
764
- ending = message
765
- ending = operator if message == :call
+ ending =
+ if message != :call
766
+ message
767
+ elsif operator != :"::"
768
+ operator
769
+ else
770
+ receiver
771
+ end
772
773
Call.new(
774
receiver: receiver,
test/fixtures/call.rb
@@ -0,0 +1,14 @@
1
+%
2
+foo.bar
3
4
+foo.()
5
6
+foo::()
7
+-
8
9
10
+foo.(1)
11
12
+foo::(1)
13
14
0 commit comments