Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit ff64523

Browse files
Support blade syntax in heredoc
1 parent b029889 commit ff64523

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

grammars/html.cson

+9
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,15 @@
4848
'include': '#php-tag'
4949
}
5050
]
51+
'L:meta.embedded.php.blade':
52+
'patterns': [
53+
{
54+
"include": "text.html.basic"
55+
}
56+
{
57+
'include': 'text.html.php.blade#blade'
58+
}
59+
]
5160
'patterns': [
5261
{
5362
'begin': '\\A#!'

grammars/php.cson

+45
Original file line numberDiff line numberDiff line change
@@ -1887,6 +1887,31 @@
18871887
}
18881888
]
18891889
}
1890+
{
1891+
'begin': '(<<<)\\s*("?)(BLADE)(\\2)(\\s*)$'
1892+
'beginCaptures':
1893+
'0':
1894+
'name': 'punctuation.section.embedded.begin.php'
1895+
'1':
1896+
'name': 'punctuation.definition.string.php'
1897+
'3':
1898+
'name': 'keyword.operator.heredoc.php'
1899+
'5':
1900+
'name': 'invalid.illegal.trailing-whitespace.php'
1901+
'contentName': 'text.html.php.blade'
1902+
'end': '^\\s*(\\3)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])'
1903+
'endCaptures':
1904+
'0':
1905+
'name': 'punctuation.section.embedded.end.php'
1906+
'1':
1907+
'name': 'keyword.operator.heredoc.php'
1908+
'name': 'meta.embedded.php.blade'
1909+
'patterns': [
1910+
{
1911+
'include': '#interpolation'
1912+
}
1913+
]
1914+
}
18901915
{
18911916
'begin': '(?i)(<<<)\\s*("?)([a-z_\\x{7f}-\\x{10ffff}]+[a-z0-9_\\x{7f}-\\x{10ffff}]*)(\\2)(\\s*)'
18921917
'beginCaptures':
@@ -2125,6 +2150,26 @@
21252150
}
21262151
]
21272152
}
2153+
{
2154+
'begin': '(<<<)\\s*\'(BLADE)\'(\\s*)$'
2155+
'beginCaptures':
2156+
'0':
2157+
'name': 'punctuation.section.embedded.begin.php'
2158+
'1':
2159+
'name': 'punctuation.definition.string.php'
2160+
'2':
2161+
'name': 'keyword.operator.nowdoc.php'
2162+
'3':
2163+
'name': 'invalid.illegal.trailing-whitespace.php'
2164+
'contentName': 'text.html.php.blade'
2165+
'end': '^\\s*(\\2)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])'
2166+
'endCaptures':
2167+
'0':
2168+
'name': 'punctuation.section.embedded.end.php'
2169+
'1':
2170+
'name': 'keyword.operator.nowdoc.php'
2171+
'name': 'meta.embedded.php.blade'
2172+
}
21282173
{
21292174
'begin': '(?i)(<<<)\\s*\'([a-z_\\x{7f}-\\x{10ffff}]+[a-z0-9_\\x{7f}-\\x{10ffff}]*)\'(\\s*)'
21302175
'beginCaptures':

0 commit comments

Comments
 (0)