Skip to content

Commit

Permalink
Merge pull request #862 from dan-zheng/master
Browse files Browse the repository at this point in the history
[Swift] Undo parsing function calls with trailing closure
  • Loading branch information
gfx authored Jan 23, 2018
2 parents bf3136f + db666a9 commit 367e989
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rouge/lexers/swift.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ class deinit enum extension final func import init internal lazy let optional pr
push :tuple
end

rule /(?!\b(if|while|for|private|internal|unowned|switch|case)\b)\b#{id}(?=(\?|!)?\s*[({])/ do |m|
if m[1] == '(' && m[0] =~ /^[[:upper:]]/
rule /(?!\b(if|while|for|private|internal|unowned|switch|case)\b)\b#{id}(?=(\?|!)?\s*[(])/ do |m|
if m[0] =~ /^[[:upper:]]/
token Keyword::Type
else
token Name::Function
Expand Down

0 comments on commit 367e989

Please sign in to comment.