* lisp/progmodes/ruby-mode.el (ruby-smie--forward-token)
(ruby-smie--backward-token): Tokenize "**" separately from "|".
Problem reported at https://github.com/dgutov/robe/issues/136.
((member tok '("unless" "if" "while" "until"))
(if (save-excursion (forward-word-strictly -1) (ruby-smie--bosp))
tok "iuwu-mod"))
- ((string-match-p "\\`|[*&]?\\'" tok)
+ ((string-match-p "\\`|[*&]*\\'" tok)
(forward-char (- 1 (length tok)))
(setq tok "|")
(cond
((ruby-smie--closing-pipe-p) "closing-|")
(t tok)))
((string-match-p "\\`[^|]+|\\'" tok) "closing-|")
- ((string-match-p "\\`|[*&]\\'" tok)
+ ((string-match-p "\\`|[*&]*\\'" tok)
(forward-char 1)
(substring tok 1))
((and (equal tok "") (eq ?\\ (char-before)) (looking-at "\n"))
in {'th' => orig_text, 'ja' => trans_text}
puts "Japanese translation: #{orig_text} => #{trans_text}"
end
+
+# Tokenizing "**" and "|" separately.
+def resolve(**args)
+ members = proc do |**args|
+ p(**args)
+ end
+
+ member.call(**args)
+end