Skip to main content
summaryrefslogtreecommitdiffstats
blob: f0163ca792ec3abf35e1c9666ad5488d0f327ae5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package org.eclipse.fx.code.editor.ldef.langs

swift {
	partitioning {
		partition __dftl_partition_content_type
		partition __swift_single_line_comment
		partition __swift_multi_line_comment
		partition __swift_string
		rule {
			single_line __swift_single_line_comment 	"//" 	=> ''
			multi_line __swift_multi_line_comment 		"/*" 	=> "*/"
			single_line __swift_string 				'"' 	=> '"' escaped by "\\"
		}
	}
	lexical_highlighting {
		rule __dftl_partition_content_type {
			default swift_default
			swift_keyword {
				keywords [
						"as", 			"break", 		"case", 		"catch",	"class"
      				, 	"continue", 	"convenience",	"default", 		"defer", 	"deinit"
      				,	"didSet",		"do",			"dynamic",		"else",		"extension"
      				,	"fallthrough",	"final",		"for",			"func",		"get"
      				,	"guard",		"if",			"import",		"in",		"infix"
      				,	"init",			"inout",		"internal",		"is",		"lazy"
      				,	"let",			"mutating",		"nil",			"operator",	"optional"
      				,	"override",		"postfix",		"prefix",		"private",	"protocol"
      				,	"public",		"repeat",		"required",		"return",	"self"
      				,	"set",			"static",		"subscript",	"super",	"switch"
      				,	"throws",		"try",			"typealias",	"unowned",	"var"
      				,	"weak",			"where",		"while",		"willSet"
      				, 	"struct",		"enum"
				]
			}
			swift_builtin_type {
				keywords [
					"Int", "Bool"
				]
			}
			swift_operator {
				character [
					"~", "!", "%", "^", "&", "*", "-", "+", "=", "|", "/", ".", "<", ">", "?"
				]
			}
			swift_number {
				pattern "[0-9]" containing "[0-9|\\.|e|E|-]"
			}
			swift_attribute {
				pattern "@" containing "[\\w]"
			}
		}
		rule __swift_single_line_comment {
			default swift_doc_default
		}
		rule __swift_multi_line_comment {
			default swift_doc_default
		}
		rule __swift_string {
			default swift_string
		}
	}
	integration {
		javafx {
			java "org.eclipse.fx.code.editor.ldef.langs.fx.swift" {
				project : "org.eclipse.fx.code.editor.ldef.langs.fx"
			}
		}
	}
}

Back to the top