branch: elpa/swift-mode commit 747d1000fb9c7e63c0d60e2c161587abdfd99bf2 Author: taku0 <mxxouy6x3m_git...@tatapa.org> Commit: taku0 <mxxouy6x3m_git...@tatapa.org>
comments: regex -> regexp --- README.md | 4 +-- swift-mode-fill.el | 4 +-- swift-mode-indent.el | 2 +- test/swift-files/indent/strings.swift | 54 +++++++++++++++++------------------ 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 84657bc979a..73bcf4221fc 100644 --- a/README.md +++ b/README.md @@ -172,13 +172,13 @@ var x = foo Both are syntactically correct code. We cannot handle this case properly. This is also a future work. -Other example is regex literals and custom operators. The following example is valid Swift code with regex literals and custom operators. +Other example is regexp literals and custom operators. The following example is valid Swift code with regexp literals and custom operators. ```swift let x = /^/ /^/ /^/ ``` -We parse them as regex literals rather than custom operators for now. +We parse them as regexp literals rather than custom operators for now. ## Hacking diff --git a/swift-mode-fill.el b/swift-mode-fill.el index e79b6c68785..eb00e055286 100644 --- a/swift-mode-fill.el +++ b/swift-mode-fill.el @@ -43,7 +43,7 @@ (rx-to-string `(seq (* blank) (or ,list-item ,atx-heading)))) - "Regex to match start of paragraphs in documentation comments. + "Regexp to match start of paragraphs in documentation comments. This is used by `swift-mode:fill-forward-paragraph' to extend `paragraph-start' such that the built-in fill functions recognize @@ -63,7 +63,7 @@ these elements as the beginnings of their own paragraphs.") ,setext-heading-underline) (* blank) eol))) - "Regex to match paragraph separators in documentation comments. + "Regexp to match paragraph separators in documentation comments. This is used by `swift-mode:fill-forward-paragraph' to extend `paragraph-separate'.") diff --git a/swift-mode-indent.el b/swift-mode-indent.el index fb6917270d3..cbe07a89d4b 100644 --- a/swift-mode-indent.el +++ b/swift-mode-indent.el @@ -227,7 +227,7 @@ declaration and its offset is `swift-mode:basic-offset'." (defun swift-mode:calculate-indent-of-multiline-string () "Return the indentation of the current line inside a multiline string. -Also used for regexes." +Also used for regexps." (back-to-indentation) (let ((string-beginning-position (save-excursion (swift-mode:beginning-of-string)))) diff --git a/test/swift-files/indent/strings.swift b/test/swift-files/indent/strings.swift index 9b998579dd0..84f4e0b71a5 100644 --- a/test/swift-files/indent/strings.swift +++ b/test/swift-files/indent/strings.swift @@ -163,7 +163,7 @@ func f() { let x = 1 - // Regexes + // Regexps // Simple case. let x = /a/ @@ -176,18 +176,18 @@ func f() { let x = /[\/ + "]/ + // " a() - // Regexes can contain quotes. + // Regexps can contain quotes. let x = /"/ let x = /"""/ - // Regex with extended delimiters can contain slashes. + // Regexp with extended delimiters can contain slashes. let x = #// /* /# - // Backslashes are still special in regexes with extended delimiters. + // Backslashes are still special in regexps with extended delimiters. let x = #/\/# /* /# a() - // Multiline regex. + // Multiline regexp. let x = #/ let x = #/ /# @@ -204,26 +204,26 @@ func f() { let x = #/ /## - // Comments are ignored in exended regexes. + // Comments are ignored in exended regexps. let x = #/ let x = "a" # /# /# - // Multiline comment cannot contain regexes with */. + // Multiline comment cannot contain regexps with */. /* - let regex = /[0-9]*/ + let regexp = /[0-9]*/ let x = "*/ // " - // Regexes without extended delimiters cannot be preceded by infix + // Regexps without extended delimiters cannot be preceded by infix // operators without whitespaces. // `a`, infix operator `+/`, `b`, and infix operator `%/` let x = a+/b %/ c() - // Regexes without extended delimiters can be preceded by infix operators + // Regexps without extended delimiters can be preceded by infix operators // with whitespaces. - // `a`, infix operator `+`, and regex /b %/ + // `a`, infix operator `+`, and regexp /b %/ let x = a + /b %/ c() @@ -231,20 +231,20 @@ func f() { let x = a/**/+/**//b %/ c() - // Regexes with extended delimiters can be preceded by infix operators + // Regexps with extended delimiters can be preceded by infix operators // without whitespaces. - // `a`, infix operator `+`, and regex #/b /# + // `a`, infix operator `+`, and regexp #/b /# let x = a+#/b /# c() - // Regexes without extended delimiters cannot start with spaces. + // Regexps without extended delimiters cannot start with spaces. let regex = Regex { digit // infix operator `/`, and `a` with postfix operator `/' / a/ digit } - // Regexes without extended delimiters cannot end with spaces. + // Regexps without extended delimiters cannot end with spaces. let regex = Regex { digit // prefix operator `/`, `a`, and infix operator `/' @@ -253,7 +253,7 @@ func f() { } let regex = Regex { digit - // regex /a/ + // regexp /a/ /a/ digit } @@ -272,7 +272,7 @@ func f() { digit } - // Regexes with extended delimiters can start with spaces. + // Regexps with extended delimiters can start with spaces. let regex = Regex { digit #/ a /# @@ -286,18 +286,18 @@ func f() { } foo { - // Regex /^/, infix operator /^/, and b(). + // Regexp /^/, infix operator /^/, and b(). let a = /^/ /^/ b() // swift-mode:test:known-bug } foo { - // Regex /^/, infix operator /^/, regex /^/, and b() + // Regexp /^/, infix operator /^/, regexp /^/, and b() let a = /^/ /^/ /^/ b() } - // Regex without extended delimiters cannot be multiline. + // Regexp without extended delimiters cannot be multiline. // Also, it cannot end with // or /* let a = /0 + // / b() @@ -306,22 +306,22 @@ func f() { */ c() - // Regexes can be preceded with prefix operators wihtout spaces. - // prefix operator `+` and regex /a %/. + // Regexps can be preceded with prefix operators wihtout spaces. + // prefix operator `+` and regexp /a %/. let x = +/a %/ b() - // Regexes without extended delimiters cannot contain unmatching close + // Regexps without extended delimiters cannot contain unmatching close // parentheses. array.reduce(1,/) { otherArray.reduce(1,/) array.reduce(1,/) }; otherArray.reduce(1,/) - // Regexes without extended delimiters can contain matching close + // Regexps without extended delimiters can contain matching close // parentheses. array.reduce(1,/(a) { otherArray.reduce(1,/) array.reduce(1,/(a) }; otherArray.reduce(1,/) - // Regexes without extended delimiters can contain escaped close + // Regexps without extended delimiters can contain escaped close // parentheses. array.reduce(1,/\) { otherArray.reduce(1,/) array.reduce(1,/\) }; otherArray.reduce(1,/) @@ -330,13 +330,13 @@ func f() { array.reduce(1,/[)] { otherArray.reduce(1,/) array.reduce(1,/[)] }; otherArray.reduce(1,/) - // Regexes with extended delimiters can contain unmatching close + // Regexps with extended delimiters can contain unmatching close // parentheses. array.reduce(1,#/) { otherArray.reduce(1,/#) array.reduce(1,#/) }; otherArray.reduce(1,/#) - // Regexes can contain unmatching close square brackets. + // Regexps can contain unmatching close square brackets. let d = a[/] %/ ] let d = a[(/)] %/