mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 11:56:01 +01:00
codemirror 5.65.9
This commit is contained in:
14
libraries/codemirror/mode/swift/swift.js
vendored
14
libraries/codemirror/mode/swift/swift.js
vendored
@@ -1,5 +1,5 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
||||
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
|
||||
|
||||
// Swift mode created by Michael Kaminsky https://github.com/mkaminsky11
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
return set
|
||||
}
|
||||
|
||||
var keywords = wordSet(["_","var","let","class","enum","extension","import","protocol","struct","func","typealias","associatedtype",
|
||||
var keywords = wordSet(["_","var","let","actor","class","enum","extension","import","protocol","struct","func","typealias","associatedtype",
|
||||
"open","public","internal","fileprivate","private","deinit","init","new","override","self","subscript","super",
|
||||
"convenience","dynamic","final","indirect","lazy","required","static","unowned","unowned(safe)","unowned(unsafe)","weak","as","is",
|
||||
"break","case","continue","default","else","fallthrough","for","guard","if","in","repeat","switch","where","while",
|
||||
"defer","return","inout","mutating","nonmutating","catch","do","rethrows","throw","throws","try","didSet","get","set","willSet",
|
||||
"defer","return","inout","mutating","nonmutating","isolated","nonisolated","catch","do","rethrows","throw","throws","async","await","try","didSet","get","set","willSet",
|
||||
"assignment","associativity","infix","left","none","operator","postfix","precedence","precedencegroup","prefix","right",
|
||||
"Any","AnyObject","Type","dynamicType","Self","Protocol","__COLUMN__","__FILE__","__FUNCTION__","__LINE__"])
|
||||
var definingKeywords = wordSet(["var","let","class","enum","extension","import","protocol","struct","func","typealias","associatedtype","for"])
|
||||
var definingKeywords = wordSet(["var","let","actor","class","enum","extension","import","protocol","struct","func","typealias","associatedtype","for"])
|
||||
var atoms = wordSet(["true","false","nil","self","super","_"])
|
||||
var types = wordSet(["Array","Bool","Character","Dictionary","Double","Float","Int","Int8","Int16","Int32","Int64","Never","Optional","Set","String",
|
||||
"UInt8","UInt16","UInt32","UInt64","Void"])
|
||||
@@ -143,14 +143,12 @@
|
||||
|
||||
function tokenComment(stream, state) {
|
||||
var ch
|
||||
while (true) {
|
||||
stream.match(/^[^/*]+/, true)
|
||||
ch = stream.next()
|
||||
if (!ch) break
|
||||
while (ch = stream.next()) {
|
||||
if (ch === "/" && stream.eat("*")) {
|
||||
state.tokenize.push(tokenComment)
|
||||
} else if (ch === "*" && stream.eat("/")) {
|
||||
state.tokenize.pop()
|
||||
break
|
||||
}
|
||||
}
|
||||
return "comment"
|
||||
|
||||
Reference in New Issue
Block a user