[gtksourceview] perl: in here-doc, allow spaces between << and quoted identifier (bug #579196)
- From: David Miguel Susano Pinto <davidpinto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] perl: in here-doc, allow spaces between << and quoted identifier (bug #579196)
- Date: Fri, 29 Mar 2013 18:48:03 +0000 (UTC)
commit b1aac51df386b12843685735b933ad74fd1af6c3
Author: Carnë Draug <carandraug+dev gmail com>
Date: Fri Mar 29 18:47:47 2013 +0000
perl: in here-doc, allow spaces between << and quoted identifier (bug #579196)
data/language-specs/perl.lang | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/data/language-specs/perl.lang b/data/language-specs/perl.lang
index 3658ee9..47a1905 100644
--- a/data/language-specs/perl.lang
+++ b/data/language-specs/perl.lang
@@ -556,6 +556,8 @@ FIXME: =pod should require an empty line before/after, as written in perlpod
</context>
<!-- #### HEREDOC STRINGS ############################################# -->
+ <!-- There may not be a space between the << and the identifier, unless the
+ identifier is explicitly quoted (hence the \s* when using quotes -->
<define-regex id="here-doc-bound-char">[^\s'"=;)]</define-regex>
@@ -563,8 +565,8 @@ FIXME: =pod should require an empty line before/after, as written in perlpod
<start extended="true" dupnames="true">
<<
(
- \'(?P<HDB>\%{here-doc-bound-char}*)\'| # 'EOF'
- \\(?P<HDB>\%{here-doc-bound-char}*) # \EOF
+ \s*\'(?P<HDB>\%{here-doc-bound-char}*)\'| # 'EOF'
+ \s*\\(?P<HDB>\%{here-doc-bound-char}*) # \EOF
)
</start>
<end>^\%{HDB start}$</end>
@@ -582,8 +584,8 @@ FIXME: =pod should require an empty line before/after, as written in perlpod
<start extended="true" dupnames="true">
<<
(
- \"(?P<HDB>\%{here-doc-bound-char}*)\"| # "EOF"
- (?P<HDB>\%{here-doc-bound-char}*) # EOF
+ \s*\"(?P<HDB>\%{here-doc-bound-char}*)\"| # "EOF"
+ (?P<HDB>\%{here-doc-bound-char}*) # EOF
)
</start>
<end>^\%{HDB start}$</end>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]