Skip to content

Commit dca378a

Browse files
committed
Rename constants
1 parent 604610d commit dca378a

File tree

1 file changed

+26
-24
lines changed

1 file changed

+26
-24
lines changed

swift-mode-font-lock.el

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ Return nil otherwise."
212212
;; Keywords
213213
;; https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/LexicalStructure.html#//apple_ref/doc/uid/TP40014097-CH30-ID410
214214

215-
(defconst swift-mode:member-functions-trailing-closure
215+
(defconst swift-mode:standard-member-functions-trailing-closure
216216
'("sort" "sorted" "split" "contains" "index" "partition" "filter" "first"
217217
"forEach" "flatMap" "withMutableCharacters" "withCString"
218218
"withUnsafeMutableBufferPointer" "withUnsafeMutablePointers"
@@ -222,7 +222,7 @@ Return nil otherwise."
222222
223223
They may be used with trailing closures and no parentheses.")
224224

225-
(defconst swift-mode:member-functions
225+
(defconst swift-mode:standard-member-functions
226226
'("symmetricDifference" "storeBytes" "starts" "stride" "sortInPlace"
227227
"successor" "suffix" "subtract" "subtracting" "subtractInPlace"
228228
"subtractWithOverflow" "squareRoot" "samePosition" "holdsUniqueReference"
@@ -266,13 +266,13 @@ They may be used with trailing closures and no parentheses.")
266266
"bindMemory")
267267
"Member functions in the standard library in Swift 3.")
268268

269-
(defconst swift-mode:global-functions-trailing-closure
269+
(defconst swift-mode:standard-global-functions-trailing-closure
270270
'("anyGenerator" "autoreleasepool")
271271
"Global functions with closures available in Swift 3.
272272
273273
They may be used with trailing closures and no parentheses.")
274274

275-
(defconst swift-mode:global-functions
275+
(defconst swift-mode:standard-global-functions
276276
'("stride" "strideof" "strideofValue" "sizeof" "sizeofValue" "sequence" "swap"
277277
"numericCast" "transcode" "isUniquelyReferenced"
278278
"isUniquelyReferencedNonObjC" "isKnownUniquelyReferenced" "zip" "dump"
@@ -283,7 +283,7 @@ They may be used with trailing closures and no parentheses.")
283283
"repeatElement" "readLine" "getVaList" "min" "max")
284284
"Global functions available in Swift 3.")
285285

286-
(defconst swift-mode:properties
286+
(defconst swift-mode:standard-properties
287287
'("startIndex" "stringValue" "stride" "size" "sign" "signBitIndex"
288288
"significand" "significandBitCount" "significandBitPattern"
289289
"significandWidth" "signalingNaN" "superclassMirror" "summary"
@@ -307,7 +307,7 @@ They may be used with trailing closures and no parentheses.")
307307
"argc" "unsafeArgv")
308308
"Properties in the standard library in Swift 3.")
309309

310-
(defconst swift-mode:enum-cases
310+
(defconst swift-mode:standard-enum-cases
311311
'("scalarValue" "size" "signalingNaN" "sound" "some" "suppressed" "sprite"
312312
"set" "none" "negativeSubnormal" "negativeNormal" "negativeInfinity"
313313
"negativeZero" "color" "collection" "customized" "toNearestOrEven"
@@ -321,7 +321,7 @@ They may be used with trailing closures and no parentheses.")
321321
322322
Note that there is some overlap between these and the properties.")
323323

324-
(defconst swift-mode:enum-types
324+
(defconst swift-mode:standard-enum-types
325325
'("ImplicitlyUnwrappedOptional" "Representation" "MemoryLayout"
326326
"FloatingPointClassification" "SetIndexRepresentation"
327327
"SetIteratorRepresentation" "FloatingPointRoundingRule"
@@ -330,7 +330,7 @@ Note that there is some overlap between these and the properties.")
330330
"FloatingPointSign" "Bit" "DictionaryIteratorRepresentation")
331331
"Enum types in the standard library in Swift 3.")
332332

333-
(defconst swift-mode:protocols
333+
(defconst swift-mode:standard-protocols
334334
'("RandomAccessCollection" "RandomAccessIndexable"
335335
"RangeReplaceableCollection" "RangeReplaceableIndexable" "RawRepresentable"
336336
"MirrorPath" "MutableCollection" "MutableIndexable" "BinaryFloatingPoint"
@@ -356,7 +356,7 @@ Note that there is some overlap between these and the properties.")
356356
"RecoverableError" "ReferenceConvertible")
357357
"Protocols in Foundation.")
358358

359-
(defconst swift-mode:structs
359+
(defconst swift-mode:standard-structs
360360
'("Repeat" "Repeated" "ReversedRandomAccessCollection"
361361
"ReversedRandomAccessIndex" "ReversedCollection" "ReversedIndex"
362362
"RandomAccessSlice" "Range" "RangeReplaceableRandomAccessSlice"
@@ -408,7 +408,7 @@ Note that there is some overlap between these and the properties.")
408408
"URLQueryItem" "URLRequest" "URLResourceValues" "UUID")
409409
"Structs in Foundation.")
410410

411-
(defconst swift-mode:typealiases
411+
(defconst swift-mode:standard-typealiases
412412
'("RawSignificand" "RawExponent" "RawValue" "BooleanLiteralType" "Buffer"
413413
"Base" "Storage" "StringLiteralType" "Stride" "Stream1" "Stream2"
414414
"SubSequence" "NativeBuffer" "Child" "Children" "CBool" "CShort"
@@ -423,11 +423,11 @@ Note that there is some overlap between these and the properties.")
423423
"Float32" "FloatLiteralType" "Float64" "AnyClass" "Any")
424424
"Typealiases in the standard library in Swift 3.")
425425

426-
(defconst swift-mode:class-types
426+
(defconst swift-mode:standard-class-types
427427
'("ManagedBuffer" "ManagedProtoBuffer" "NonObjectiveCBase" "AnyGenerator")
428428
"Built-in class types.")
429429

430-
(defconst swift-mode:precedence-groups
430+
(defconst swift-mode:standard-precedence-groups
431431
'("BitwiseShift" "Assignment" "RangeFormation" "Casting" "Addition"
432432
"NilCoalescing" "Comparison" "LogicalConjunction" "LogicalDisjunction"
433433
"Default" "Ternary" "Multiplication" "FunctionArrow")
@@ -502,52 +502,54 @@ Excludes true, false, and keywords begin with a number sign.")
502502
'swift-mode:keyword-face)
503503

504504
(,(concat "\\."
505-
(regexp-opt swift-mode:member-functions-trailing-closure 'words)
505+
(regexp-opt swift-mode:standard-member-functions-trailing-closure
506+
'words)
506507
"\\s-*[({]")
507508
1
508509
'swift-mode:builtin-method-trailing-closure-face)
509510

510511
(,(concat "\\."
511-
(regexp-opt swift-mode:member-functions 'words)
512+
(regexp-opt swift-mode:standard-member-functions 'words)
512513
"\\s-*(")
513514
1
514515
'swift-mode:builtin-method-face)
515516

516-
(,(concat (regexp-opt swift-mode:global-functions-trailing-closure 'words)
517+
(,(concat (regexp-opt swift-mode:standard-global-functions-trailing-closure
518+
'words)
517519
"\\s-*[({]")
518520
1
519521
'swift-mode:builtin-function-trailing-closure-face)
520522

521-
(,(concat (regexp-opt swift-mode:global-functions 'words)
523+
(,(concat (regexp-opt swift-mode:standard-global-functions 'words)
522524
"\\s-*(")
523525
1
524526
'swift-mode:builtin-function-face)
525527

526-
(,(concat "\\." (regexp-opt swift-mode:properties 'words))
528+
(,(concat "\\." (regexp-opt swift-mode:standard-properties 'words))
527529
1
528530
'swift-mode:builtin-propertie-face)
529531

530-
(,(concat "\\." (regexp-opt swift-mode:enum-cases 'words))
532+
(,(concat "\\." (regexp-opt swift-mode:standard-enum-cases 'words))
531533
1
532534
'swift-mode:builtin-enum-case-face)
533535

534536
(,(regexp-opt swift-mode:build-config-keywords 'words)
535537
.
536538
'swift-mode:build-config-keyword-face)
537539

538-
(,(regexp-opt (append swift-mode:class-types
539-
swift-mode:enum-types
540+
(,(regexp-opt (append swift-mode:standard-class-types
541+
swift-mode:standard-enum-types
540542
swift-mode:foundation-protocols
541543
swift-mode:foundation-structs
542-
swift-mode:protocols
543-
swift-mode:structs
544-
swift-mode:typealiases)
544+
swift-mode:standard-protocols
545+
swift-mode:standard-structs
546+
swift-mode:standard-typealiases)
545547
'words)
546548
.
547549
'swift-mode:builtin-type-face)
548550

549551
(,(concat "\\<"
550-
(regexp-opt swift-mode:precedence-groups 'non-nil)
552+
(regexp-opt swift-mode:standard-precedence-groups 'non-nil)
551553
"Precedence\\>")
552554
.
553555
'swift-mode:builtin-precedence-group-face)

0 commit comments

Comments
 (0)