lib/rouge/lexers/swift.rb in rouge-3.14.0 vs lib/rouge/lexers/swift.rb in rouge-3.15.0

- old
+ new

@@ -23,11 +23,11 @@ #available #colorLiteral #column #else #elseif #endif #error #file #fileLiteral #function #if #imageLiteral #line #selector #sourceLocation #warning ) declarations = Set.new %w( - class deinit enum convenience extension final func import init internal lazy let optional private protocol public required static struct subscript typealias var dynamic indirect associatedtype open fileprivate + class deinit enum convenience extension final func import init internal lazy let optional private protocol public required static struct subscript typealias var dynamic indirect associatedtype open fileprivate some ) constants = Set.new %w( true false nil ) @@ -65,9 +65,10 @@ rule %r/./, Comment::Multiline end state :root do mixin :whitespace + rule %r/\$(([1-9]\d*)?\d)/, Name::Variable rule %r{[()\[\]{}:;,?\\]}, Punctuation rule %r([-/=+*%<>!&|^.~]+), Operator rule %r/@?"/, Str, :dq