lib/rouge/lexers/swift.rb in rouge-3.1.0 vs lib/rouge/lexers/swift.rb in rouge-3.1.1

- old
+ new

@@ -110,11 +110,11 @@ rule /(let|var)\b(\s*)([(])/ do groups Keyword, Text, Punctuation 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 end end