Skip to content

Commit 7f624d2

Browse files
committed
Clean up some minor formatting issues in Swift syntax file.
1 parent ac37222 commit 7f624d2

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

bootstrap/src/default_syntax_swift.h

+7-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ static constexpr const char* DEFAULT_SYNTAX_SWIFT =
55
"supported_api_styles = [\"free-form\"];\n"
66
"supported_code_models = [\"loop-switch\", \"recursive-functions\"];\n"
77
"supported_targets = [\"code\", \"dot\"];\n"
8-
"supported_features = [\"nested-ifs\", \"bitmaps\", \"case-ranges\", \"tags\", \"captures\",\n"
9-
" \"captvars\"];\n"
8+
"supported_features = [\"nested-ifs\", \"bitmaps\", \"case-ranges\", \"tags\", \"captures\", \"captvars\"];\n"
109
"\n"
1110
"\n"
1211
"// language-specific options ---------------------------------------------------\n"
@@ -239,9 +238,13 @@ static constexpr const char* DEFAULT_SYNTAX_SWIFT =
239238
" indent [stmt: stmt] dedent\n"
240239
" \"}\" nl;\n"
241240
"\n"
242-
"code:fncall = topindent (.retval ? retval \" = \") (.yyfn.throw ? \"try \") name \"(\" [arg{0:-2}: arg \", \"] [arg{-1}: arg] \")\" nl;\n"
241+
"code:fncall =\n"
242+
" topindent (.retval ? retval \" = \") (.yyfn.throw ? \"try \")\n"
243+
" name \"(\" [arg{0:-2}: arg \", \"] [arg{-1}: arg] \")\" nl;\n"
243244
"\n"
244-
"code:tailcall = topindent (.retval ? \"return \") (.yyfn.throw ? \"try \") name \"(\" [arg{0:-2}: arg \", \"] [arg{-1}: arg] \")\" nl;\n"
245+
"code:tailcall =\n"
246+
" topindent (.retval ? \"return \") (.yyfn.throw ? \"try \")\n"
247+
" name \"(\" [arg{0:-2}: arg \", \"] [arg{-1}: arg] \")\" nl;\n"
245248
"\n"
246249
"code:recursive_functions = [fn: fndef nl];\n"
247250
"\n"

include/syntax/swift

+7-4
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ supported_apis = ["simple", "generic", "record"];
44
supported_api_styles = ["free-form"];
55
supported_code_models = ["loop-switch", "recursive-functions"];
66
supported_targets = ["code", "dot"];
7-
supported_features = ["nested-ifs", "bitmaps", "case-ranges", "tags", "captures",
8-
"captvars"];
7+
supported_features = ["nested-ifs", "bitmaps", "case-ranges", "tags", "captures", "captvars"];
98

109

1110
// language-specific options ---------------------------------------------------
@@ -238,9 +237,13 @@ code:fndef =
238237
indent [stmt: stmt] dedent
239238
"}" nl;
240239

241-
code:fncall = topindent (.retval ? retval " = ") (.yyfn.throw ? "try ") name "(" [arg{0:-2}: arg ", "] [arg{-1}: arg] ")" nl;
240+
code:fncall =
241+
topindent (.retval ? retval " = ") (.yyfn.throw ? "try ")
242+
name "(" [arg{0:-2}: arg ", "] [arg{-1}: arg] ")" nl;
242243

243-
code:tailcall = topindent (.retval ? "return ") (.yyfn.throw ? "try ") name "(" [arg{0:-2}: arg ", "] [arg{-1}: arg] ")" nl;
244+
code:tailcall =
245+
topindent (.retval ? "return ") (.yyfn.throw ? "try ")
246+
name "(" [arg{0:-2}: arg ", "] [arg{-1}: arg] ")" nl;
244247

245248
code:recursive_functions = [fn: fndef nl];
246249

0 commit comments

Comments
 (0)