Skip to content

Commit 9a2b508

Browse files
authored
Merge pull request #180 from kennith/add-error-directive
Add @error directive
2 parents 740e8f1 + 8750ec9 commit 9a2b508

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

blade.sublime-syntax

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ contexts:
9090
pop: true
9191
- include: 'scope:source.php'
9292

93-
- match: '(\s{0}|^)(\@)\b(acfrepeater|auth|block|break|can|cannot|choice|case|component|continue|dd|debug|dump|each|elsecan|elsecannot|elseif|embed|extends|for|foreach|forelse|guest|hasSection|hipchat|if|isset|include|includeIf|includeWhen|inject|lang|layout|macro|macrodef|method|minify|partial|php|push|render|section|servers|set|slack|slot|stack|story|switch|task|unless|unset|while|wpposts|yield)\b(?=(|\s*|)\(\()'
93+
- match: '(\s{0}|^)(\@)\b(acfrepeater|auth|block|break|can|cannot|choice|case|component|continue|dd|debug|dump|each|elsecan|elsecannot|elseif|embed|error|extends|for|foreach|forelse|guest|hasSection|hipchat|if|isset|include|includeIf|includeWhen|inject|lang|layout|macro|macrodef|method|minify|partial|php|push|render|section|servers|set|slack|slot|stack|story|switch|task|unless|unset|while|wpposts|yield)\b(?=(|\s*|)\(\()'
9494
captures:
9595
0: punctuation.section.embedded.php
9696
2: constant.other.inline-data.html
@@ -102,7 +102,7 @@ contexts:
102102
pop: true
103103
- include: 'scope:source.php'
104104

105-
- match: '(\s{0}|^)(\@)\b(acfrepeater|auth|block|break|can|cannot|choice|case|component|continue|dd|debug|dump|each|elsecan|elsecannot|elseif|embed|extends|for|foreach|forelse|guest|hasSection|hipchat|if|isset|include|includeIf|includeWhen|inject|lang|layout|macro|macrodef|method|minify|partial|php|push|render|section|servers|set|slack|slot|stack|story|switch|task|unless|unset|while|wpposts|yield)\b(?=(|\s*|)\()'
105+
- match: '(\s{0}|^)(\@)\b(acfrepeater|auth|block|break|can|cannot|choice|case|component|continue|dd|debug|dump|each|elsecan|elsecannot|elseif|embed|error|extends|for|foreach|forelse|guest|hasSection|hipchat|if|isset|include|includeIf|includeWhen|inject|lang|layout|macro|macrodef|method|minify|partial|php|push|render|section|servers|set|slack|slot|stack|story|switch|task|unless|unset|while|wpposts|yield)\b(?=(|\s*|)\()'
106106
captures:
107107
0: punctuation.section.embedded.php
108108
2: constant.other.inline-data.html
@@ -114,7 +114,7 @@ contexts:
114114
pop: true
115115
- include: 'scope:source.php'
116116

117-
- match: '(\s{0}|^)(\@)\b(acfend|after|append|auth|break|breakpoint|continue|csrf|default|else|empty|endswitch|endafter|endauth|endblock|endcan|endcannot|endcomponent|endembed|endempty|endfor|endforeach|endforelse|endguest|endif|endisset|endmacro|endmarkdown|endminify|endpartial|endpush|endsection|endsetup|endslot|endstory|endtask|endunless|endwhile|guest|markdown|overwrite|parent|setup|show|stop|verbatim|endverbatim|wpempty|wpend|wpquery)\b'
117+
- match: '(\s{0}|^)(\@)\b(acfend|after|append|auth|break|breakpoint|continue|csrf|default|else|empty|endswitch|endafter|endauth|endblock|endcan|endcannot|endcomponent|endembed|endempty|enderror|endfor|endforeach|endforelse|endguest|endif|endisset|endmacro|endmarkdown|endminify|endpartial|endpush|endsection|endsetup|endslot|endstory|endtask|endunless|endwhile|guest|markdown|overwrite|parent|setup|show|stop|verbatim|endverbatim|wpempty|wpend|wpquery)\b'
118118
scope: custom.compiler.blade.php
119119
captures:
120120
0: punctuation.section.embedded.php

test.blade.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,4 +410,8 @@
410410
@csrf
411411
@dd('Compile the "dd" statements into valid PHP.')
412412
@dump('Compile the "dump" statements into valid PHP')
413-
@method('post')
413+
@method('post')
414+
415+
{{-- Validation Errors --}}
416+
@error('title')
417+
@enderror

0 commit comments

Comments
 (0)