diff --git a/.gitattributes b/.gitattributes index 026c41c..845d978 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,17 @@ -messages/* linguist-documentation -*.blade linguist-documentation -*.blade.php linguist-documentation +# exclude from sublime-package +.github/ export-ignore +.gitattributes export-ignore +.gitignore export-ignore +*.cmd export-ignore +packages.json export-ignore + +# linguist documentation settings +messages/* linguist-documentation +*.blade linguist-documentation +*.blade.php linguist-documentation + +# linguist language settings +*.sublime-completions linguist-language=JSONC +*.sublime-settings linguist-language=JSONC +*.sublime-syntax linguist-language=YAML +*.tmPreferences linguist-language=XML diff --git a/.github/workflows/ci-syntax-tests.yml b/.github/workflows/ci-syntax-tests.yml new file mode 100644 index 0000000..1a6352a --- /dev/null +++ b/.github/workflows/ci-syntax-tests.yml @@ -0,0 +1,39 @@ +name: CI Syntax Tests + +on: + push: + push: + - '**' + paths: + - '.github/workflows/ci-syntax-tests.yml' + - '**.sublime-syntax' + - '**/syntax_test_*' + - '**.tmPreferences' + pull_request: + branches: + - '**' + paths: + - '.github/workflows/ci-syntax-tests.yml' + - '**.sublime-syntax' + - '**/syntax_test_*' + - '**.tmPreferences' + workflow_dispatch: + +jobs: + syntax_tests: + name: Sublime Text ${{ matrix.build }} + runs-on: ubuntu-latest + timeout-minutes: 15 # default is 6 hours! + strategy: + matrix: + include: + - build: 4137 + default_packages: v4137 + - build: latest + default_packages: master + steps: + - uses: actions/checkout@v3 + - uses: SublimeText/syntax-test-action@v2 + with: + build: ${{ matrix.build }} + default_packages: ${{ matrix.default_packages }} diff --git a/Completions/Blade Directives (inside-directive).sublime-completions b/Completions/Blade Directives (inside-directive).sublime-completions new file mode 100644 index 0000000..6f8c673 --- /dev/null +++ b/Completions/Blade Directives (inside-directive).sublime-completions @@ -0,0 +1,602 @@ +{ + // Use this file in case `@` sign was already entered manually and a keyword + // is being typed in order to avoid adding duplicate `@` when commiting completion. + "scope": "meta.directive.blade - source.php", + "completions": [ + { + "trigger": "acfrepeater", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "acfend", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "after", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "append", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "auth", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "block", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "break", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "breakpoint", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "can", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "canany", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "cannot", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "case", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "choice", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "class", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "component", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "continue", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "csrf", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "dd", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "debug", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "default", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "dump", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "each", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "else", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "elsecan", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "elsecanany", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "elsecannot", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "elseif", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "embed", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "empty", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endafter", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endauth", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endblock", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endcan", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endcanany", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endcannot", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endcomponent", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endembed", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endempty", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endenv", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "enderror", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endfor", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endforeach", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endforelse", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endguest", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endif", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endisset", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endmacro", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endmarkdown", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endminify", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endonce", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endpartial", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endproduction", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endpush", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endsection", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endsetup", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endslot", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endstory", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endswitch", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endtask", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endunless", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endverbatim", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endwhile", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "env", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "error", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "extends", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "for", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "foreach", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "forelse", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "guest", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "hasSection", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "hipchat", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "if", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "include", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "includeFirst", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "includeIf", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "includeUnless", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "includeWhen", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "inject", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "isset", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "js", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "lang", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "layout", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "livewire", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "livewireScripts", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "livewireStyles", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "macro", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "macrodef", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "markdown", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "method", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "minify", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "once", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "overwrite", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "parent", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "partial", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "php", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "production", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "push", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "render", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "section", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "servers", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "set", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "setup", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "show", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "slack", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "slot", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "stack", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "stop", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "story", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "switch", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "task", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "unless", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "unset", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "verbatim", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "while", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "wpempty", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "wpend", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "wpposts", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "wpquery", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "yield", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + ], +} \ No newline at end of file diff --git a/Completions/Blade Directives.sublime-completions b/Completions/Blade Directives.sublime-completions new file mode 100644 index 0000000..f2087a3 --- /dev/null +++ b/Completions/Blade Directives.sublime-completions @@ -0,0 +1,720 @@ +{ + // Use this file in case `@` sign was not yet entered and a keyword is being typed. + "scope": "(text.html.blade | source.css.blade | source.js.blade) - meta.directive.blade - source.php - text.plain", + "completions": [ + { + "trigger": "acfrepeater", + "contents": "@acfrepeater", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "acfend", + "contents": "@acfend", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "after", + "contents": "@after", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "append", + "contents": "@append", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "auth", + "contents": "@auth", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "block", + "contents": "@block", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "break", + "contents": "@break", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "breakpoint", + "contents": "@breakpoint", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "can", + "contents": "@can", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "canany", + "contents": "@canany", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "cannot", + "contents": "@cannot", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "case", + "contents": "@case", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "choice", + "contents": "@choice", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "class", + "contents": "@class", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "component", + "contents": "@component", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "continue", + "contents": "@continue", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "csrf", + "contents": "@csrf", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "dd", + "contents": "@dd", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "debug", + "contents": "@debug", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "default", + "contents": "@default", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "dump", + "contents": "@dump", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "each", + "contents": "@each", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "else", + "contents": "@else", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "elsecan", + "contents": "@elsecan", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "elsecanany", + "contents": "@elsecanany", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "elsecannot", + "contents": "@elsecannot", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "elseif", + "contents": "@elseif", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "embed", + "contents": "@embed", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "empty", + "contents": "@empty", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endafter", + "contents": "@endafter", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endauth", + "contents": "@endauth", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endblock", + "contents": "@endblock", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endcan", + "contents": "@endcan", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endcanany", + "contents": "@endcanany", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endcannot", + "contents": "@endcannot", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endcomponent", + "contents": "@endcomponent", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endembed", + "contents": "@endembed", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endempty", + "contents": "@endempty", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endenv", + "contents": "@endenv", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "enderror", + "contents": "@enderror", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endfor", + "contents": "@endfor", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endforeach", + "contents": "@endforeach", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endforelse", + "contents": "@endforelse", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endguest", + "contents": "@endguest", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endif", + "contents": "@endif", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endisset", + "contents": "@endisset", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endmacro", + "contents": "@endmacro", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endmarkdown", + "contents": "@endmarkdown", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endminify", + "contents": "@endminify", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endonce", + "contents": "@endonce", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endpartial", + "contents": "@endpartial", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endproduction", + "contents": "@endproduction", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endpush", + "contents": "@endpush", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endsection", + "contents": "@endsection", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endsetup", + "contents": "@endsetup", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endslot", + "contents": "@endslot", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endstory", + "contents": "@endstory", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endswitch", + "contents": "@endswitch", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endtask", + "contents": "@endtask", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endunless", + "contents": "@endunless", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endverbatim", + "contents": "@endverbatim", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "endwhile", + "contents": "@endwhile", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "env", + "contents": "@env", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "error", + "contents": "@error", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "extends", + "contents": "@extends", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "for", + "contents": "@for", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "foreach", + "contents": "@foreach", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "forelse", + "contents": "@forelse", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "guest", + "contents": "@guest", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "hasSection", + "contents": "@hasSection", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "hipchat", + "contents": "@hipchat", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "if", + "contents": "@if", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "include", + "contents": "@include", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "includeFirst", + "contents": "@includeFirst", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "includeIf", + "contents": "@includeIf", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "includeUnless", + "contents": "@includeUnless", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "includeWhen", + "contents": "@includeWhen", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "inject", + "contents": "@inject", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "isset", + "contents": "@isset", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "js", + "contents": "@js", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "lang", + "contents": "@lang", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "layout", + "contents": "@layout", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "livewire", + "contents": "@livewire", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "livewireScripts", + "contents": "@livewireScripts", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "livewireStyles", + "contents": "@livewireStyles", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "macro", + "contents": "@macro", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "macrodef", + "contents": "@macrodef", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "markdown", + "contents": "@markdown", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "method", + "contents": "@method", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "minify", + "contents": "@minify", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "once", + "contents": "@once", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "overwrite", + "contents": "@overwrite", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "parent", + "contents": "@parent", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "partial", + "contents": "@partial", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "php", + "contents": "@php", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "production", + "contents": "@production", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "push", + "contents": "@push", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "render", + "contents": "@render", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "section", + "contents": "@section", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "servers", + "contents": "@servers", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "set", + "contents": "@set", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "setup", + "contents": "@setup", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "show", + "contents": "@show", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "slack", + "contents": "@slack", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "slot", + "contents": "@slot", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "stack", + "contents": "@stack", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "stop", + "contents": "@stop", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "story", + "contents": "@story", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "switch", + "contents": "@switch", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "task", + "contents": "@task", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "unless", + "contents": "@unless", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "unset", + "contents": "@unset", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "verbatim", + "contents": "@verbatim", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "while", + "contents": "@while", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "wpempty", + "contents": "@wpempty", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "wpend", + "contents": "@wpend", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "wpposts", + "contents": "@wpposts", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "wpquery", + "contents": "@wpquery", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + { + "trigger": "yield", + "contents": "@yield", + "kind": "keyword", + "details": "Laravel Blade Directive", + }, + ], +} \ No newline at end of file diff --git a/Syntaxes/Blade.sublime-syntax b/Syntaxes/Blade.sublime-syntax new file mode 100644 index 0000000..affbc02 --- /dev/null +++ b/Syntaxes/Blade.sublime-syntax @@ -0,0 +1,170 @@ +%YAML 1.2 +--- +# This hidden syntax is not meant for direct use, but as a library for +# Blade template directives and echo statements. +# +# Note: These contexts are not directly included into `HTML (Blade)` because +# syntax cache of `CSS (Blade)` and `JavaScript (Blade)` would be +# significant larger then for some unknown reason. (Tested with ST 4146) +# +# https://laravel.com/docs/9.x +# http://www.sublimetext.com/docs/syntax.html +name: Blade +scope: source.blade +version: 2 +hidden: true + +variables: + + directive_keywords: |- + (?x: acfrepeater | auth | block | break | can | canany | cannot | case + | choice | class | component | continue | dd | debug | dump | each | elsecan + | elsecanany | elsecannot | elseif | embed | empty | env | error | extends + | for | foreach | forelse | guest | hasSection | hipchat | if | include + | includeFirst | includeIf | includeUnless | includeWhen | inject | isset + | js | lang | layout | livewire | macro | macrodef | method | minify + | partial | php | push | render | section | servers | set | slack | slot + | stack | story | switch | task | unless | unset | while | wpposts | yield ) + + bare_directive_keywords: |- + (?x: acfend | after | append | auth | break | breakpoint | continue | csrf + | default | else | empty | endafter | endauth | endblock | endcan | endcanany + | endcannot | endcomponent | endembed | endempty | endempty | endenv + | enderror | endfor | endforeach | endforelse | endguest | endif | endisset + | endmacro | endmarkdown | endminify | endonce | endpartial | endproduction + | endpush | endsection | endsetup | endslot | endstory | endswitch | endtask + | endunless | endverbatim | endwhile | guest | livewireScripts + | livewireStyles | markdown | once | overwrite | parent | production | setup + | show | stop | verbatim | wpempty | wpend | wpquery ) + +contexts: + + main: + - include: blade-embedded + +###[ BLADE ]################################################################### + + blade-embedded: + - include: blade-comments + - include: blade-escaped-echos + - include: blade-unescaped-echos + - include: blade-raw-echos + - include: blade-php-directives + - include: blade-other-directives + +###[ BLADE INTERPOLATIONS ]#################################################### + + blade-interpolations: + - match: (?={{2,3}-?|{!!|@[[:alpha:]{]) + push: blade-interpolation-body + + blade-interpolation-body: + - clear_scopes: 1 + - meta_include_prototype: false + - include: blade-embedded + - include: immediately-pop + +###[ BLADE COMMENTS ]########################################################## + + blade-comments: + - match: '{{--' + scope: punctuation.definition.comment.begin.blade + push: blade-comment-body + + blade-comment-body: + - meta_include_prototype: false + - meta_scope: meta.embedded.blade comment.block.blade + - match: '--}}' + scope: punctuation.definition.comment.end.blade + pop: true + - match: -- + scope: invalid.illegal.bad-comments.blade + +###[ BLADE ECHO ]############################################################## + + blade-escaped-echos: + - match: '{{2,3}-?' + scope: meta.interpolation.blade punctuation.section.interpolation.begin.blade + embed: Packages/PHP/PHP Source.sublime-syntax + embed_scope: meta.interpolation.blade source.php.embedded.blade + escape: '-?}{2,3}' + escape_captures: + 0: meta.interpolation.blade punctuation.section.interpolation.end.blade + + blade-unescaped-echos: + - match: '{!!' + scope: meta.interpolation.blade punctuation.section.interpolation.begin.blade + embed: Packages/PHP/PHP Source.sublime-syntax + embed_scope: meta.interpolation.blade source.php.embedded.blade + escape: '!!}' + escape_captures: + 0: meta.interpolation.blade punctuation.section.interpolation.end.blade + + blade-raw-echos: + - match: '@{{2,3}-?' + scope: punctuation.section.interpolation.begin.blade + push: blade-raw-echo-body + + blade-raw-echo-body: + - meta_include_prototype: false + - meta_scope: meta.interpolation.blade + - meta_content_scope: text.plain.embedded.blade + - match: '-?}{2,3}' + scope: punctuation.section.interpolation.end.blade + pop: true + +###[ BLADE PHP DIRECTIVES ]#################################################### + + blade-php-directives: + - match: (@)php\b(?!\s*\(.*\)) + scope: meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade + captures: + 1: punctuation.definition.keyword.blade + embed: Packages/PHP/PHP Source.sublime-syntax + embed_scope: meta.embedded.blade source.php.embedded.blade + escape: (@)endphp\b + escape_captures: + 0: meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade + 1: punctuation.definition.keyword.blade + +###[ BLADE DIRECTIVES ]######################################################## + + blade-other-directives: + - match: (@){{directive_keywords}}(?=\s*\() + scope: meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade + captures: + 1: punctuation.definition.keyword.blade + push: blade-directive-argument-list + - match: (@){{bare_directive_keywords}}\b + scope: meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade + captures: + 1: punctuation.definition.keyword.blade + - match: (@)[a-zA-Z_]+\b + scope: meta.embedded.blade source.blade meta.directive.blade variable.function.blade + captures: + 1: punctuation.definition.keyword.blade + push: blade-directive-argument-list + + blade-directive-argument-list: + - meta_include_prototype: false + - meta_content_scope: meta.embedded.blade source.blade meta.directive.blade + - match: \( + scope: punctuation.section.arguments.begin.blade + set: blade-directive-argument-list-body + - match: (?!\s*\() + pop: 1 + + blade-directive-argument-list-body: + - meta_include_prototype: false + - meta_scope: meta.embedded.blade source.blade meta.directive.arguments.blade + - meta_content_scope: source.php.embedded.blade + - match: \) + scope: punctuation.section.arguments.end.blade + pop: 1 + - include: Packages/PHP/PHP Source.sublime-syntax#expressions + +###[ PROTOTYPES ]############################################################## + + immediately-pop: + - match: '' + pop: 1 diff --git a/Syntaxes/CSS (Blade).sublime-syntax b/Syntaxes/CSS (Blade).sublime-syntax new file mode 100644 index 0000000..80d1a63 --- /dev/null +++ b/Syntaxes/CSS (Blade).sublime-syntax @@ -0,0 +1,30 @@ +%YAML 1.2 +--- +name: CSS (Blade) +scope: source.css.blade +version: 2 + +extends: Packages/PHP/CSS (PHP).sublime-syntax + +file_extensions: + - blade.css + +contexts: + + main: + # exclude prototype to give normal at-rules + # precedence over blade directives + - meta_prepend: true + - meta_include_prototype: false + + prototype: + - meta_prepend: true + - include: Blade.sublime-syntax#blade-embedded + + at-other: + - meta_prepend: true + - include: Blade.sublime-syntax#blade-embedded + + string-content: + - meta_prepend: true + - include: Blade.sublime-syntax#blade-interpolations diff --git a/Syntaxes/CSS (for Blade double-quoted).sublime-syntax b/Syntaxes/CSS (for Blade double-quoted).sublime-syntax new file mode 100644 index 0000000..eab264a --- /dev/null +++ b/Syntaxes/CSS (for Blade double-quoted).sublime-syntax @@ -0,0 +1,19 @@ +%YAML 1.2 +--- +# This hidden syntax is included into quoted strings +# to properly handle {{ echo statements with "quoted strings" }}. +scope: source.css.blade.embedded.string.quoted.double +version: 2 +hidden: true + +extends: CSS (Blade).sublime-syntax + +contexts: + + prototype: + - meta_prepend: true + - match: (?=") + pop: 1 + + main: + - include: rule-list-body diff --git a/Syntaxes/CSS (for Blade single-quoted).sublime-syntax b/Syntaxes/CSS (for Blade single-quoted).sublime-syntax new file mode 100644 index 0000000..983812e --- /dev/null +++ b/Syntaxes/CSS (for Blade single-quoted).sublime-syntax @@ -0,0 +1,19 @@ +%YAML 1.2 +--- +# This hidden syntax is included into quoted strings +# to properly handle {{ echo statements with 'quoted strings' }}. +scope: source.css.blade.embedded.string.quoted.single +version: 2 +hidden: true + +extends: CSS (Blade).sublime-syntax + +contexts: + + prototype: + - meta_prepend: true + - match: (?=') + pop: 1 + + main: + - include: rule-list-body diff --git a/Comments.tmPreferences b/Syntaxes/HTML (Blade) - Comments.tmPreferences similarity index 84% rename from Comments.tmPreferences rename to Syntaxes/HTML (Blade) - Comments.tmPreferences index a42a384..d99bf7e 100644 --- a/Comments.tmPreferences +++ b/Syntaxes/HTML (Blade) - Comments.tmPreferences @@ -2,10 +2,8 @@ - name - Comments scope - text.html.blade, source.php.blade, custom.compiler.blade.php + text.html.blade - source.php settings shellVariables @@ -36,7 +34,5 @@ - uuid - 157b8800-b2cb-11e4-ab27-0800200c9a66 \ No newline at end of file diff --git a/Syntaxes/HTML (Blade).sublime-settings b/Syntaxes/HTML (Blade).sublime-settings new file mode 100644 index 0000000..88f14a6 --- /dev/null +++ b/Syntaxes/HTML (Blade).sublime-settings @@ -0,0 +1,3 @@ +{ + "auto_complete_selector": "( meta.tag | meta.embedded.directive ) - comment", +} \ No newline at end of file diff --git a/Syntaxes/HTML (Blade).sublime-syntax b/Syntaxes/HTML (Blade).sublime-syntax new file mode 100644 index 0000000..6160791 --- /dev/null +++ b/Syntaxes/HTML (Blade).sublime-syntax @@ -0,0 +1,166 @@ +%YAML 1.2 +--- +# https://laravel.com/docs/9.x +# http://www.sublimetext.com/docs/syntax.html +name: HTML (Blade) +scope: text.html.blade +version: 2 + +extends: Packages/PHP/PHP.sublime-syntax + +file_extensions: + - blade + - blade.php + +contexts: + + prototype: + - meta_prepend: true + - include: Blade.sublime-syntax#blade-embedded + + php: + # This is the main php context. + # It includes `php-tags` which are allowed to be closed by php tags at any + # level of code-block on stack resuming with the next top-level php tag. + - include: php-tags + - include: html + + cdata-content: + - meta_prepend: true + - include: Blade.sublime-syntax#blade-interpolations + + script-javascript-content: + - meta_include_prototype: false + - match: \s*(( + escape_captures: + 0: meta.tag.sgml.cdata.html punctuation.definition.tag.end.html + - match: '{{script_content_begin}}' + captures: + 1: comment.block.html punctuation.definition.comment.begin.html + pop: 1 # make sure to match only once + embed: scope:source.js.blade + embed_scope: source.js.embedded.html + escape: '{{script_content_end}}' + escape_captures: + 1: source.js.embedded.html + 2: comment.block.html punctuation.definition.comment.end.html + 3: source.js.embedded.html + 4: comment.block.html punctuation.definition.comment.end.html + + style-css-content: + - meta_include_prototype: false + - match: \s*(( + escape_captures: + 0: meta.tag.sgml.cdata.html punctuation.definition.tag.end.html + - match: '{{style_content_begin}}' + captures: + 1: comment.block.html punctuation.definition.comment.begin.html + pop: 1 # make sure to match only once + embed: scope:source.css.blade + embed_scope: source.css.embedded.html + escape: '{{style_content_end}}' + escape_captures: + 1: source.css.embedded.html + 2: comment.block.html punctuation.definition.comment.end.html + 3: source.css.embedded.html + 4: comment.block.html punctuation.definition.comment.end.html + + tag-event-attribute-value: + # note: only needed for backward compatibility with ST4143 + - meta_include_prototype: false + - match: \" + scope: string.quoted.double.html punctuation.definition.string.begin.html + set: tag-event-attribute-value-double-quoted-body + - match: \' + scope: string.quoted.single.html punctuation.definition.string.begin.html + set: tag-event-attribute-value-single-quoted-body + - include: else-pop + + tag-event-attribute-value-double-quoted-body: + # note: only needed for backward compatibility with ST4143 + - meta_include_prototype: false + - meta_scope: meta.string.html + - meta_content_scope: source.js.embedded.html + - match: \" + scope: string.quoted.double.html punctuation.definition.string.end.html + pop: 1 + - include: tag-event-attribute-value-double-quoted-content + + tag-event-attribute-value-double-quoted-content: + - include: scope:source.js.blade.embedded.string.quoted.double + + tag-event-attribute-value-single-quoted-body: + # note: only needed for backward compatibility with ST4143 + - meta_include_prototype: false + - meta_scope: meta.string.html + - meta_content_scope: source.js.embedded.html + - match: \' + scope: string.quoted.single.html punctuation.definition.string.end.html + pop: 1 + - include: tag-event-attribute-value-single-quoted-content + + tag-event-attribute-value-single-quoted-content: + - include: scope:source.js.blade.embedded.string.quoted.single + + tag-style-attribute-value: + # note: only needed for backward compatibility with ST4143 + - meta_include_prototype: false + - match: \" + scope: string.quoted.double.html punctuation.definition.string.begin.html + set: tag-style-attribute-value-double-quoted-body + - match: \' + scope: string.quoted.single.html punctuation.definition.string.begin.html + set: tag-style-attribute-value-single-quoted-body + - include: else-pop + + tag-style-attribute-value-double-quoted-body: + # note: only needed for backward compatibility with ST4143 + - meta_include_prototype: false + - meta_scope: meta.string.html + - meta_content_scope: source.css.embedded.html + - match: \" + scope: string.quoted.double.html punctuation.definition.string.end.html + pop: 1 + - include: tag-style-attribute-value-double-quoted-content + + tag-style-attribute-value-double-quoted-content: + - include: scope:source.css.blade.embedded.string.quoted.double + + tag-style-attribute-value-single-quoted-body: + # note: only needed for backward compatibility with ST4143 + - meta_include_prototype: false + - meta_scope: meta.string.html + - meta_content_scope: source.css.embedded.html + - match: \' + scope: string.quoted.single.html punctuation.definition.string.end.html + pop: 1 + - include: tag-style-attribute-value-single-quoted-content + + tag-style-attribute-value-single-quoted-content: + - include: scope:source.css.blade.embedded.string.quoted.single + + tag-attribute-value-content: + - meta_prepend: true + - include: Blade.sublime-syntax#blade-interpolations + + strings-common-content: + - meta_prepend: true + - include: Blade.sublime-syntax#blade-interpolations diff --git a/Syntaxes/JavaScript (Blade).sublime-syntax b/Syntaxes/JavaScript (Blade).sublime-syntax new file mode 100644 index 0000000..d4acea9 --- /dev/null +++ b/Syntaxes/JavaScript (Blade).sublime-syntax @@ -0,0 +1,20 @@ +%YAML 1.2 +--- +name: JavaScript (Blade) +scope: source.js.blade +version: 2 + +extends: Packages/PHP/JavaScript (PHP).sublime-syntax + +file_extensions: + - blade.js + +contexts: + + prototype: + - meta_prepend: true + - include: Blade.sublime-syntax#blade-embedded + + string-content: + - meta_prepend: true + - include: Blade.sublime-syntax#blade-interpolations diff --git a/Syntaxes/JavaScript (for Blade double-quoted).sublime-syntax b/Syntaxes/JavaScript (for Blade double-quoted).sublime-syntax new file mode 100644 index 0000000..4595dd1 --- /dev/null +++ b/Syntaxes/JavaScript (for Blade double-quoted).sublime-syntax @@ -0,0 +1,15 @@ +%YAML 1.2 +--- +# This hidden syntax is included into quoted strings +# to properly handle {{ echo statements with "quoted strings" }}. +scope: source.js.blade.embedded.string.quoted.double +version: 2 +hidden: true + +extends: JavaScript (Blade).sublime-syntax + +contexts: + prototype: + - meta_prepend: true + - match: (?=") + pop: 1 diff --git a/Syntaxes/JavaScript (for Blade single-quoted).sublime-syntax b/Syntaxes/JavaScript (for Blade single-quoted).sublime-syntax new file mode 100644 index 0000000..f1dbd38 --- /dev/null +++ b/Syntaxes/JavaScript (for Blade single-quoted).sublime-syntax @@ -0,0 +1,15 @@ +%YAML 1.2 +--- +# This hidden syntax is included into quoted strings +# to properly handle {{ echo statements with 'quoted strings' }}. +scope: source.js.blade.embedded.string.quoted.single +version: 2 +hidden: true + +extends: JavaScript (Blade).sublime-syntax + +contexts: + prototype: + - meta_prepend: true + - match: (?=') + pop: 1 diff --git a/blade.sublime-syntax b/blade.sublime-syntax deleted file mode 100644 index 35a87d1..0000000 --- a/blade.sublime-syntax +++ /dev/null @@ -1,139 +0,0 @@ -%YAML 1.2 ---- -name: Laravel Blade -file_extensions: [blade, blade.php] -scope: text.blade -contexts: - main: - - match: '' - push: - - include: 'scope:text.html.basic' - - meta_scope: text.html.blade - pop: true - with_prototype: - - - match: '{{--' - captures: - 0: punctuation.definition.comment.begin.blade - push: - - meta_scope: comment.block.html.blade - - match: '--}}' - scope: punctuation.definition.comment.end.blade - pop: true - - match: "--" - scope: invalid.illegal.bad-comments-or-CDATA.html.blade - - - match: '\{(!!)|(\{\{\{?)-?' - captures: - 0: punctuation.section.embedded.begin.blade - push: - - meta_scope: entity.name.tag.blade - - meta_content_scope: source.php.blade - - match: '-?(\}?\}\})|(!!)\}' - captures: - 0: punctuation.section.embedded.end.blade - 1: punctuation.section.embedded.end.blade - pop: true - - include: 'scope:source.php' - - - match: '@\{\{\{?-?' - captures: - 0: punctuation.section.embedded.ignore.begin.blade - push: - - meta_scope: 'scope:text.html.basic' - - meta_content_scope: 'scope:text.html.basic' - - match: '-?\}?\}\}' - captures: - 0: punctuation.section.embedded.ignore.end.blade - 1: punctuation.section.embedded.ignore.end.blade - pop: true - - - match: '<\?(?i:php|=)?' - captures: - 0: punctuation.section.embedded.begin.blade - push: - - meta_content_scope: source.php.blade - - meta_scope: entity.name.tag.blade - - match: (?=\?>)(\?>) - captures: - 0: punctuation.section.embedded.end.blade - pop: true - - include: 'scope:source.php' - - - match: '((\s{0}|^)(@)(php)(?!.*\(*\))|<\?(?i:php|=)?)(?![^?]*\?>)' - scope: punctuation.section.embedded.begin.php - captures: - 0: punctuation.section.embedded.begin.php - 3: constant.other.inline-data.html - 4: entity.name.tag.block.any.html - push: - - meta_content_scope: source.php - - meta_scope: meta.embedded.block.blade.php - with_prototype: - - match: (?=\?>|(\s{0}|^)(@)(endphp))(\?>|(\s{0}|^)(@)(endphp)) - captures: - 0: punctuation.section.embedded.end.php - 6: constant.other.inline-data.html - 7: entity.name.tag.block.any.html - pop: true - - include: 'scope:source.php' - - - match: '<\?(?i:php|=)?' - scope: punctuation.section.embedded.begin.php - push: - - meta_content_scope: source.php.blade - - meta_scope: meta.embedded.line.blade.php - with_prototype: - - match: (?=\?>)(\?>) - captures: - 0: punctuation.section.embedded.end.php - pop: true - - include: 'scope:source.php' - - - match: '(\s{0}|^)(\@)\b(acfrepeater|auth|block|break|can|cannot|canany|choice|case|component|continue|dd|debug|dump|each|elsecan|elsecannot|elsecanany|elseif|embed|error|extends|for|foreach|forelse|guest|hasSection|hipchat|if|isset|empty|include|includeFirst|includeIf|includeUnless|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|livewire)\b(?=(|\s*|)\(\()' - captures: - 0: punctuation.section.embedded.php - 2: constant.other.inline-data.html - 3: entity.name.tag.block.any.html - push: - - meta_scope: custom.compiler.blade.php - - meta_content_scope: source.php.blade - - match: '(?<=\)\))' - pop: true - - include: 'scope:source.php' - - - match: '(\s{0}|^)(\@)\b(acfrepeater|auth|block|break|can|cannot|canany|choice|case|component|continue|dd|debug|dump|each|elsecan|elsecannot|elsecanany|elseif|embed|error|extends|for|foreach|forelse|guest|hasSection|hipchat|if|isset|empty|include|includeFirst|includeIf|includeUnless|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|livewire)\b(?=(|\s*|)\()' - captures: - 0: punctuation.section.embedded.php - 2: constant.other.inline-data.html - 3: entity.name.tag.block.any.html - push: - - meta_scope: custom.compiler.blade.php - - meta_content_scope: source.php.blade - - match: '(?<=\))' - pop: true - - include: 'scope:source.php' - - - match: '(\s{0}|^)(\@)\b(acfend|after|append|auth|break|breakpoint|continue|csrf|default|else|empty|endswitch|endafter|endauth|endblock|endcan|endcannot|endcanany|endcomponent|endembed|endempty|enderror|endfor|endforeach|endforelse|endguest|endif|endisset|endempty|endmacro|endmarkdown|endminify|endpartial|endpush|endsection|endsetup|endslot|endstory|endtask|endunless|endwhile|guest|markdown|overwrite|parent|setup|show|stop|verbatim|endverbatim|wpempty|wpend|wpquery|livewireStyles|livewireScripts)\b' - scope: custom.compiler.blade.php - captures: - 0: punctuation.section.embedded.php - 2: constant.other.inline-data.html - 3: entity.name.tag.block.any.html - - - match: '(\s{0}|^)(\@)\b([a-zA-Z_]+)\b(?=(|\s*|)\()' - captures: - 0: support.function - 2: constant.other.inline-data.html - push: - - meta_scope: custom.compiler.blade.php - - meta_content_scope: source.php.blade - - match: '(?<=\))' - pop: true - - include: 'scope:source.php' - - - match: '(\s{0}|^)(\@)\b([a-zA-Z_]+)\b(\s?)\b' - scope: custom.compiler.blade.php - captures: - 0: support.function - 2: constant.other.inline-data.html diff --git a/messages.json b/messages.json index a996954..330f3e7 100644 --- a/messages.json +++ b/messages.json @@ -5,5 +5,6 @@ "1.1.1": "messages/1.1.1.txt", "1.1.3": "messages/1.1.3.txt", "1.5.0": "messages/1.5.0.txt", - "1.5.4": "messages/1.5.4.txt" + "1.5.4": "messages/1.5.4.txt", + "2.0.0": "messages/2.0.0.txt" } diff --git a/messages/2.0.0.txt b/messages/2.0.0.txt new file mode 100644 index 0000000..47c8574 --- /dev/null +++ b/messages/2.0.0.txt @@ -0,0 +1,33 @@ +2.0.0 +----- + +This release provides a re-written Laravel Blade syntax for Sublime Text 4137+, +which extends rewritten PHP syntax and makes use of latest syntax engine features. + +It resolves issues #191 and #194 by embedding extended JS/CSS syntaxes. + +ATTENTION +--------- + +This release comes with a number of breaking changes +which may require some adjustments for snippets or plugins to continue working! + +1. Primary syntax definition is `HTML (Blade)`. + + The name follows a common naming scheme being used for various template syntaxes + and expresses HTML to be the base syntax being extended by Blade template code. + + This release also ships with `CSS (Blade)` and `JavaScript (Blade)`, which can + be used to highlight standalone CSS/JS templates, if ever needed. + +2. The already existing `text.html.blade` is now the main scope replacing `text.blade`. + + This is also to expresses Blade being based on HTML. + +3. Scope names have completely been overhauled/refactored to follow current guidelines + and to express semantic meaning of certain expressions more accurately. + +Please close and re-open all open Blade templates to re-assign new syntax definitions! + +--- +Bug Tracker: https://github.com/Medalink/laravel-blade diff --git a/messages/install.txt b/messages/install.txt index 56eb01b..6748763 100644 --- a/messages/install.txt +++ b/messages/install.txt @@ -1,5 +1 @@ -Laravel Blade Highlighter - -This package adds syntax definitions for the Laravel 4 & 5 Blade engine. - -Works with Sublime Text 3. \ No newline at end of file +The package provides syntax definitions for Laravel Blade engine. \ No newline at end of file diff --git a/test.blade.php b/test.blade.php deleted file mode 100644 index d8ccd86..0000000 --- a/test.blade.php +++ /dev/null @@ -1,434 +0,0 @@ -{{-- Echo Data --}} -Hello, {{ $name }}. -The current UNIX timestamp is {{ time() }}. - -{{-- Echoing Data After Checking For Existence --}} -{{ isset($name) ? $name : 'Default' }} -{{ $name or 'Default' }} - -{{-- Displaying Raw Text With Curly Braces --}} -@{{ This will not be processed by Blade }} - -{{-- Do not escape data --}} -Hello, {!! $name !!}. - -{{-- Escape Data --}} -Hello, {{{ $name }}}. - - - - - - -@include('header') - -{{-- Service injection --}} -@inject('metrics', 'App\Services\MetricsService') - -{{-- PHP open/close tags --}} -
- @php - foreach (range(1, 10) as $number) { - echo $number; - } - @endphp -
- -{{-- Inline PHP --}} -
- @php(custom_function()) - @php($bool = $var ?? false) - @php($bool = $bool ?: true) -
- -@include('footer') - -{{-- Define Blade Layout --}} - - - - @hasSection('title') - @yield('title') - App Name - @else - App Name - @endif - - - - @section('sidebar') - This is the master sidebar. - @stop - -
- @yield('content') -
- - - -{{-- Use Blade Layout --}} -@extends('layouts.master') - -@section('sidebar') -

This is appended to the master sidebar.

-@stop - -@section('content') -

This is my body content.

-@stop - -{{-- yield section --}} -@yield('section', 'Default Content') - -{{-- If Statement --}} -@if (count($records) === 1) - I have one record! -@elseif (count($records) > 1) - I have multiple records! -@else - I don't have any records! -@endif - - - -@isset($name) - Hello, {{ $name }}. -@endisset - -@empty($name) - Hello, {{ $name }}. -@endempty - -@unless (Auth::check()) - You are not signed in. -@endunless - -{{-- Loops --}} -@for ($i = 0; $i < 10; $i++) - The current value is {{ $i }} -@endfor - -@foreach ($users as $user) -

This is user {{ $user->id }}

-@endforeach - -@forelse($users as $user) -
  • {{ $user->name }}
  • -@empty -

    No users

    -@endforelse - -@while (true) -

    I'm looping forever.

    -@endwhile - -{{-- Include --}} -@include('view.name') -@include('view.name', ['some' => 'data']) -@includeIf('view.name', ['some' => 'data']) - -{{-- Overwriting Sections --}} -@extends('list.item.container') - -@section('list.item.content') -

    This is an item of type {{ $item->type }}

    -@overwrite - -{{-- Displaying Language Lines --}} -@lang('language.line') - -@choice('language.line', 1) - -{{-- This comment will not be in the rendered HTML --}} - -{{-- -This comment will not be in the rendered HTML -This comment will not be in the rendered HTML -This comment will not be in the rendered HTML - --}} - -{{-- Blade Extensions Compatibility --}} -{{-- https://github.com/RobinRadic/blade-extensions --}} -@foreach($stuff as $key => $val) - {{ $loop->index }} {{-- int, zero based --}} - {{ $loop->index1 }} {{-- int, starts at 1 --}} - {{ $loop->revindex }} {{-- int --}} - {{ $loop->revindex1 }} {{-- int --}} - {{ $loop->first }} {{-- bool --}} - {{ $loop->last }} {{-- bool --}} - {{ $loop->even }} {{-- bool --}} - {{ $loop->odd }} {{-- bool --}} - {{ $loop->length }} {{-- int --}} - - @foreach($other as $name => $age) - - {{ $loop->parent->odd }} - - @foreach($friends as $foo => $bar) - - {{ $loop->parent->index }} - {{ $loop->parent->parentLoop->index }} - - @endforeach - - @endforeach - - @section('content') - @partial('partials.danger-panel') - @block('title', 'This is the panel title') - - @block('body') - This is the panel body. - @endblock - @endpartial - @stop - - @partial('partials.panel') - @block('type', 'danger') - - @block('title') - Danger! @render('title') - @endblock - @endpartial - - {{-- with arguments --}} - @continue($user->type == 1) - @break($user->number == 5) - - {{-- without arguments --}} - @break - @continue - -@endforeach - -{{ $newvar }} -@set('newvar', 'value') -@set($now, new DateTime('now')) -@set('myArr', ['my' => 'arr']) -@set('myArr2', array('my' => 'arr')) - -@unset('newvar') -@unset($newvar) - -@debug($somearr) - -// xdebug_break breakpoints (configurable) to debug compiled views. Sweet? YES! -@breakpoint - -@markdown -# Some markdown code -** with some bold text too ** -@endmarkdown - -@section('content') - @embed('components.panel', ['type' => 'danger', 'items' => ['first', 'second', 'third'] ]) - @section('content') -

    Hello World!

    - @stop - @endembed -@stop - -@macrodef('divider', $class = 'divider', $role = 'seperator') - "; ?> -@endmacro - -
    -

    Title

    - - @macro("divider") - -

    Paragraph

    -
    - -@embed('blade-ext::dropdown', ['button' => true ]) - @section('label', 'Choose') - @section('items') - @macro('item', 'Action') - @macro('item', 'Another Action') - @macro('item', 'Something else here') - @macro('item', 'Separated link') - @stop -@endembed - - - - - -{{-- Authorization (ACL) --}} - -@can('permission', $entity) - You have permission! -@endcan - -@can('permission', $entity) - You have permission! -@else - You don't have permission! -@endcan - -@cannot ('update', [ 'post' => $post ]) - breeze -@endcannot - -@can ('show-post', $post) - Can Show -@elsecan ('write-post', $post) - Can write -@elsecannot ('delete-post', $post) - Not Allowed -@else - Not Allowed -@endcan - -@canany (['show-post', 'write-post']) - Can Show or write -@elsecanany (['update-post', 'delete-post']) - Can update or delete -@endcanany - -{{-- Stacks --}} -@push('scripts') - -@endpush - - - @stack('scripts') - - -{{-- Custom Control Structures --}} -@custom - -@foo('bar', 'baz') - @datetime($var) - ---- - -{{-- Envoyer directives --}} - -@setup - $now = new DateTime(); - - $environment = isset($env) ? $env : "testing"; -@endsetup - -@servers(['web' => 'user@192.168.1.1']) - -@task('foo') - cd site - git pull origin {{ $branch }} - php artisan migrate -@endtask - -@after - @hipchat('token', 'room', 'Envoy') - @slack('hook', 'channel', 'message') -@endafter - -@story('deploy') - git - composer install -@endstory - -@component('layouts.app') - @slot('title') - Home Page - @endslot - -
    - @component('inc.alert') - This is the alert message here. - @endcomponent -

    Welcome

    -
    -
    - @component('inc.sidebar') - This is my sidebar text. - @endcomponent -
    - - @includeWhen(Auth::user(), 'nav.user') -@endcomponent - -@verbatim -
    - Hello, {{ $name }}. -
    -@endverbatim - -@switch($char) - @case('A') -

    A

    - @break - - @case('B') -

    B

    - @break - - @default -

    Default

    -@endswitch - -{{-- Complex conditional --}} -@if(($x == true) && ($y == false)) - foo -@endif - -{{-- Single line if statement --}} -@if($foo === true)

    Text

    @endif - -{{-- Quoted blade directive matching --}} -

    Text

    - -{{-- Complex conditional inline --}} -

    Text

    - -{{-- Helpers --}} -@csrf -@dd('Compile the "dd" statements into valid PHP.') -@dump('Compile the "dump" statements into valid PHP') -@method('post') - -{{-- Validation Errors --}} -@error('title') -@enderror - -{{-- Livewire --}} -@livewireStyles -@livewireScripts -@livewire('show-contact', ['contact' => $contact]) diff --git a/tests/syntax_test_blade.blade.css b/tests/syntax_test_blade.blade.css new file mode 100644 index 0000000..9073e19 --- /dev/null +++ b/tests/syntax_test_blade.blade.css @@ -0,0 +1,39 @@ +/* SYNTAX TEST "CSS (Blade).sublime-syntax" */ + + @if(true) +/* ^^^ meta.embedded.blade source.blade meta.directive.blade */ +/* ^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade */ +/* ^ - meta.embedded.blade source.blade meta.directive */ +/* ^^^ keyword.control.directive.blade */ +/* ^ punctuation.section.arguments.begin.blade */ +/* ^^^^ source.php.embedded.blade constant.language.boolean.php */ +/* ^ punctuation.section.arguments.end.blade */ + + @media (min-width: 768px) { } +/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.at-rule.media.css */ +/* ^^^^^^ keyword.control.directive.css */ + + @endif +/* ^^^^^^ meta.embedded.blade source.blade meta.directive.blade */ +/* ^ - meta.embedded.blade source.blade meta.directive */ +/* ^^^^^^ keyword.control.directive.blade */ + +.my-{{ $class }} { +/* ^^^^^^^^^^^^ meta.selector.css meta.interpolation.blade */ +/* ^^ punctuation.section.interpolation.begin.blade - source.php */ +/* ^^^^^^^^ source.php.embedded.blade */ +/* ^^ punctuation.section.interpolation.end.blade - source.php */ + color: {{ $color }}; +/* ^^^^^^^^^^^^ meta.property-value.css meta.interpolation.blade */ +/* ^^ punctuation.section.interpolation.begin.blade - source.php */ +/* ^^^^^^^^ source.php.embedded.blade */ +/* ^^ punctuation.section.interpolation.end.blade - source.php */ + + background-color: "#{{ $hex_color }}"; +/* ^^ meta.property-value.css meta.string.css string.quoted.double.css */ +/* ^^^^^^^^^^^^^^^^ meta.property-value.css meta.string.css meta.interpolation.blade */ +/* ^ meta.property-value.css meta.string.css string.quoted.double.css */ +/* ^^ punctuation.section.interpolation.begin.blade - source.php */ +/* ^^^^^^^^^^^^ source.php.embedded.blade */ +/* ^^ punctuation.section.interpolation.end.blade - source.php */ +} diff --git a/tests/syntax_test_blade.blade.js b/tests/syntax_test_blade.blade.js new file mode 100644 index 0000000..1912e32 --- /dev/null +++ b/tests/syntax_test_blade.blade.js @@ -0,0 +1,21 @@ +/* SYNTAX TEST "JavaScript (Blade).sublime-syntax" */ + + @if(true) +/* ^^^ meta.embedded.blade source.blade meta.directive.blade */ +/* ^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade */ +/* ^ - meta.embedded.blade source.blade meta.directive */ +/* ^^^ keyword.control.directive.blade */ +/* ^ punctuation.section.arguments.begin.blade */ +/* ^^^^ source.php.embedded.blade constant.language.boolean.php */ +/* ^ punctuation.section.arguments.end.blade */ + + var app = {{ Illuminate\Support\Js::from($array) }}; +/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.interpolation.blade */ +/* ^^ punctuation.section.interpolation.begin.blade - source.php */ +/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.php.embedded.blade */ +/* ^^ punctuation.section.interpolation.end.blade - source.php */ + + @endif +/* ^^^^^^ meta.embedded.blade source.blade meta.directive.blade */ +/* ^ - meta.embedded.blade source.blade meta.directive */ +/* ^^^^^^ keyword.control.directive.blade */ diff --git a/tests/syntax_test_blade.blade.php b/tests/syntax_test_blade.blade.php new file mode 100644 index 0000000..692680e --- /dev/null +++ b/tests/syntax_test_blade.blade.php @@ -0,0 +1,1194 @@ +{{-- SYNTAX TEST "HTML (Blade).sublime-syntax" --}} + + {{-- This comment will not be in the rendered HTML --}} +{{--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.embedded.blade comment.block.blade --}} +{{--^^^^ punctuation.definition.comment.begin.blade --}} +{{-- ^^^^ punctuation.definition.comment.end.blade --}} +{{-- ^ - comment --}} + + {{-- + This comment will not be in the rendered HTML + This comment will not be in the rendered HTML + This comment will not be in the rendered HTML + --}} +{{-- ^^^^ punctuation.definition.comment.end.blade --}} +{{-- ^ - comment --}} + +{{-- PHP tags --}} + + +{{--^^^^^^^^^^^^^^^^^^^^^ meta.embedded.php --}} +{{--^^^^^ punctuation.section.embedded.begin.php --}} +{{-- ^^^^^^^^^^^^^ source.php.embedded.html --}} +{{-- ^^ punctuation.section.embedded.end.php --}} + + +{{--^^^^^^^^^^^^^ meta.embedded.php --}} +{{--^^^ punctuation.section.embedded.begin.php --}} +{{-- ^^^^^^^^ source.php.embedded.html --}} +{{-- ^^ punctuation.section.embedded.end.php --}} + + +{{--^^ meta.embedded.php punctuation.section.embedded.end.php --}} + +{{-- Echo Data --}} + + Hello, {{ $name }}. +{{--^^^^^^^ text.html.blade - meta.interpolation --}} +{{-- ^^^^^^^^^^^ text.html.blade meta.interpolation.blade --}} +{{-- ^^ punctuation.section.interpolation.begin.blade - source.php --}} +{{-- ^^^^^^^ source.php.embedded.blade --}} +{{-- ^^^^^ variable.other.php --}} +{{-- ^^ punctuation.section.interpolation.end.blade - source.php --}} +{{-- ^^ text.html.blade - meta.interpolation --}} + + The current UNIX timestamp is {{ time() }}. +{{--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ text.html.blade - meta.interpolation --}} +{{-- ^^^^^^^^^^^^ text.html.blade meta.interpolation.blade --}} +{{-- ^^ punctuation.section.interpolation.begin.blade - source.php --}} +{{-- ^^^^^^^^ source.php.embedded.blade --}} +{{-- ^^^^ support.function --}} +{{-- ^^ punctuation.section.interpolation.end.blade - source.php --}} +{{-- ^^ text.html.blade - meta.interpolation --}} + +{{-- Echoing Data After Checking For Existence --}} + + {{ isset($name) ? $name : 'Default' }} +{{--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.interpolation.blade --}} +{{--^^ punctuation.section.interpolation.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^^^^^ support.function.builtin.php --}} +{{-- ^ keyword.operator.ternary.php --}} +{{-- ^ keyword.operator.ternary.php --}} +{{-- ^^^^^^^^^ meta.string.php string.quoted.single.php --}} +{{-- ^^ punctuation.section.interpolation.end.blade - source.php --}} + + {{ $name or 'Default' }} +{{--^^^^^^^^^^^^^^^^^^^^^^^^ meta.interpolation.blade --}} +{{--^^ punctuation.section.interpolation.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^^^^^ variable.other.php --}} +{{-- ^^ keyword.operator.logical.php --}} +{{-- ^^^^^^^^^ meta.string.php string.quoted.single.php --}} +{{-- ^^ punctuation.section.interpolation.end.blade - source.php --}} + +{{-- Do not escape data --}} + + Hello, {!! $name !!}. +{{--^^^^^^^ text.html.blade - meta.interpolation --}} +{{-- ^^^^^^^^^^^^^ text.html.blade meta.interpolation.blade --}} +{{-- ^^^ punctuation.section.interpolation.begin.blade - source.php --}} +{{-- ^^^^^^^ source.php.embedded.blade --}} +{{-- ^^^^^ variable.other.php --}} +{{-- ^^^ punctuation.section.interpolation.end.blade - source.php --}} +{{-- ^^ text.html.blade - meta.interpolation --}} + +{{-- Escape Data --}} + + Hello, {{{ $name }}}. +{{--^^^^^^^ text.html.blade - meta.interpolation --}} +{{-- ^^^^^^^^^^^^^ text.html.blade meta.interpolation.blade --}} +{{-- ^^^ punctuation.section.interpolation.begin.blade - source.php --}} +{{-- ^^^^^^^ source.php.embedded.blade --}} +{{-- ^^^^^ variable.other.php --}} +{{-- ^^^ punctuation.section.interpolation.end.blade - source.php --}} +{{-- ^^ text.html.blade - meta.interpolation --}} + +{{-- Displaying Raw Text With Curly Braces --}} + + @{{ This will not by Blade }} +{{--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.interpolation.blade - meta.tag - source --}} +{{--^^^ punctuation.section.interpolation.begin.blade - source.php --}} +{{-- ^^ punctuation.section.interpolation.end.blade - source.php --}} + + @{{- This will not by Blade -}} +{{--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.interpolation.blade - meta.tag - source --}} +{{--^^^^ punctuation.section.interpolation.begin.blade - source.php --}} +{{-- ^^^ punctuation.section.interpolation.end.blade - source.php --}} + + @{{{- This will not by Blade -}}} +{{--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.interpolation.blade - meta.tag - source --}} +{{--^^^^^ punctuation.section.interpolation.begin.blade - source.php --}} +{{-- ^^^^ punctuation.section.interpolation.end.blade - source.php --}} + +{{-- Include Directive --}} + + @include('header') +{{--^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{--^^^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^ source.php.embedded.blade meta.string.php string.quoted.single.php --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + + @include('view.name', ['some' => 'data']) +{{--^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{--^^^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + + @includeIf('view.name', ['some' => 'data']) +{{--^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{--^^^^^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + +{{-- Service injection --}} + + @inject('metrics', 'App\Services\MetricsService') +{{--^^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{--^^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + +{{-- PHP open/close tags --}} + +
    + @php +{{-- ^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade - sourc.php --}} +{{-- ^ punctuation.definition.keyword.blade --}} +{{-- ^ source.php.embedded.blade --}} + foreach (range(1, 10) as $number) { + echo $number; + } + @endphp +{{-- ^ source.php.embedded.blade --}} +{{-- ^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade - source.php --}} +{{-- ^ punctuation.definition.keyword.blade --}} +
    + +{{-- Inline PHP --}} + +
    + @php(custom_function()) +{{-- ^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{-- ^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^^^^^^^^^^^^^^^ variable.function.php --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + + @php($bool = $var ?? false) +{{-- ^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{-- ^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^^^^^ variable.other.php --}} +{{-- ^ keyword.operator.assignment.php --}} +{{-- ^^^^ variable.other.php --}} +{{-- ^^ keyword.operator.null-coalescing.php --}} +{{-- ^^^^^ constant.language.boolean.php --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + + @php($bool = $bool ?: true) +{{-- ^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{-- ^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^^^^^ variable.other.php --}} +{{-- ^ keyword.operator.assignment.php --}} +{{-- ^^^^^ variable.other.php --}} +{{-- ^^ keyword.operator.ternary.php --}} +{{-- ^^^^ constant.language.boolean.php --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} +
    + +{{-- Define Blade Layout --}} + + + + + @hasSection('title') +{{-- ^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{-- ^^^^^^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + @yield('title') - App Name +{{-- ^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{-- ^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + @else +{{-- ^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + App Name + @endif +{{-- ^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + + + + @section('sidebar') +{{-- ^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{-- ^^^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + This is the master sidebar. + @stop +{{-- ^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +
    + @yield('content') +{{-- ^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{-- ^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} +
    + + + +{{-- Use Blade Layout --}} + + @extends('layouts.master') +{{--^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + + @section('sidebar') +{{--^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} +

    This is appended to the master sidebar.

    +{{-- ^^^ meta.tag --}} +{{-- ^^^^ meta.tag --}} + @stop +{{--^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + + @section('content') +{{--^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} +

    This is my body content.

    + @stop +{{--^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + +{{-- yield section --}} + + @yield('section', 'Default Content') +{{--^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + +{{-- Empty Statement --}} + + @empty($name) +{{--^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + Hello, {{ $name }}. +{{-- ^^^^^^^ text.html.blade - meta.interpolation --}} +{{-- ^^^^^^^^^^^ text.html.blade meta.interpolation.blade --}} +{{-- ^^ punctuation.section.interpolation.begin.blade - source.php --}} +{{-- ^^^^^^^ source.php.embedded.blade --}} +{{-- ^^^^^ variable.other.php --}} +{{-- ^^ punctuation.section.interpolation.end.blade - source.php --}} +{{-- ^^ text.html.blade - meta.interpolation --}} + @endempty +{{--^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + +{{-- If Statement --}} + + @if (count($records) === 1) +{{--^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + I have one record! +{{-- ^^^^^^^^^^^^^^^^^^^^ text.html.blade - meta.embedded.blade source.blade meta.directive - source.php --}} + @elseif (count($records) > 1) +{{--^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + I have multiple records! +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^ text.html.blade - meta.embedded.blade source.blade meta.directive - source.php --}} + @else +{{--^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + I don't have any records! +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ text.html.blade - meta.embedded.blade source.blade meta.directive - source.php --}} + @endif +{{--^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + +{{-- Complex if statement --}} + + @if(($x == true) && ($y == false)) +{{--^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + foo + @endif +{{--^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + +{{-- Single line if statement --}} + + @if($foo === true)

    Text

    @endif +{{--^^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive --}} +{{-- ^^^^^^^^^^^^^ - meta.embedded.blade source.blade meta.directive --}} +{{-- ^^^^^^ meta.embedded.blade source.blade meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + +{{-- Isset Statement --}} + + @isset($name) +{{--^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + Hello, {{ $name }}. +{{-- ^^^^^^^ text.html.blade - meta.interpolation --}} +{{-- ^^^^^^^^^^^ text.html.blade meta.interpolation.blade --}} +{{-- ^^ punctuation.section.interpolation.begin.blade - source.php --}} +{{-- ^^^^^^^ source.php.embedded.blade --}} +{{-- ^^^^^ variable.other.php --}} +{{-- ^^ punctuation.section.interpolation.end.blade - source.php --}} +{{-- ^^ text.html.blade - meta.interpolation --}} + @endisset +{{--^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + +{{-- Unless Statement --}} + + @unless (Auth::check()) +{{--^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + You are not signed in. +{{-- ^^^^^^^^^^^^^^^^^^^^^^ text.html.blade - meta.interpolation --}} + @endunless +{{--^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + +{{-- Switch Statement --}} + + @switch($char) +{{--^^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + @case('A') +{{-- ^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{-- ^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} +

    A

    + @break +{{-- ^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + + @case('B') +{{-- ^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{-- ^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} +

    B

    + @break +{{-- ^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + @default +{{-- ^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +

    Default

    + @endswitch +{{--^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + +{{-- Loops --}} + + @for ($i = 0; $i < 10; $i++) +{{--^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + The current value is {{ $i }} + @endfor +{{--^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + + @foreach ($users as $user) +{{--^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} +

    This is user {{ $user->id }}

    + @endforeach +{{--^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + + @forelse($users as $user) +{{--^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} +
  • {{ $user->name }}
  • + @empty +{{--^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +

    No users

    + @endforelse +{{--^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + + @while (true) +{{--^^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} +

    I'm looping forever.

    + @endwhile +{{--^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + +{{-- Overwriting Sections --}} + + @extends('list.item.container') + + @section('list.item.content') +

    This is an item of type {{ $item->type }}

    + @overwrite + +{{-- Displaying Language Lines --}} + + @lang('language.line') +{{--^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + + @choice('language.line', 1) +{{--^^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + +{{-- Blade Extensions Compatibility --}} +{{-- https://github.com/RobinRadic/blade-extensions --}} + + @foreach($stuff as $key => $val) + {{ $loop->index }} {{-- int, zero based --}} + {{ $loop->index1 }} {{-- int, starts at 1 --}} + {{ $loop->revindex }} {{-- int --}} + {{ $loop->revindex1 }} {{-- int --}} + {{ $loop->first }} {{-- bool --}} + {{ $loop->last }} {{-- bool --}} + {{ $loop->even }} {{-- bool --}} + {{ $loop->odd }} {{-- bool --}} + {{ $loop->length }} {{-- int --}} + + @foreach($other as $name => $age) + + {{ $loop->parent->odd }} + + @foreach($friends as $foo => $bar) + + {{ $loop->parent->index }} + {{ $loop->parent->parentLoop->index }} + + @endforeach + + @endforeach + + @section('content') + @partial('partials.danger-panel') + @block('title', 'This is the panel title') + + @block('body') + This is the panel body. + @endblock + @endpartial + @stop + + @partial('partials.panel') + @block('type', 'danger') + + @block('title') + Danger! @render('title') + @endblock + @endpartial + + {{-- with arguments --}} + @continue($user->type == 1) + @break($user->number == 5) + + {{-- without arguments --}} + @break + @continue + + @endforeach + + {{ $newvar }} + @set('newvar', 'value') + @set($now, new DateTime('now')) + @set('myArr', ['my' => 'arr']) + @set('myArr2', array('my' => 'arr')) + + @unset('newvar') + @unset($newvar) + + @debug($somearr) + + // xdebug_break breakpoints (configurable) to debug compiled views. Sweet? YES! + @breakpoint + + @markdown + # Some markdown code + ** with some bold text too ** + @endmarkdown + + @section('content') + @embed('components.panel', ['type' => 'danger', 'items' => ['first', 'second', 'third'] ]) + @section('content') +

    Hello World!

    + @stop + @endembed + @stop + + @macrodef('divider', $class = 'divider', $role = 'seperator') + "; ?> + @endmacro + +
    +

    Title

    + + @macro("divider") + +

    Paragraph

    +
    + + @embed('blade-ext::dropdown', ['button' => true ]) + @section('label', 'Choose') + @section('items') + @macro('item', 'Action') + @macro('item', 'Another Action') + @macro('item', 'Something else here') + @macro('item', 'Separated link') + @stop + @endembed + +{{-- Embedded JavaScript --}} + + + +{{-- Embedded CSS --}} + + + +{{-- Authorization (ACL) --}} + + @can('permission', $entity) +{{--^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + You have permission! + @endcan +{{--^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + + @can('permission', $entity) +{{--^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + You have permission! + @else +{{--^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + You don't have permission! + @endcan +{{--^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + + @cannot ('update', [ 'post' => $post ]) +{{--^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + breeze + @endcannot +{{--^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + + @can ('show-post', $post) +{{--^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + Can Show + @elsecan ('write-post', $post) +{{--^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + Can write + @elsecannot ('delete-post', $post) +{{--^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^^^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + Not Allowed + @else +{{--^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + Not Allowed + @endcan +{{--^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + + @canany (['show-post', 'write-post']) +{{--^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + Can Show or write + @elsecanany (['update-post', 'delete-post']) +{{--^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^^^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + Can update or delete + @endcanany +{{--^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + +{{-- Stacks --}} + + @push('scripts') +{{--^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + + @endpush +{{--^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + + + @stack('scripts') +{{-- ^^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{-- ^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + + + @once +{{--^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + @push('scripts') +{{-- ^^^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{-- ^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + > + @endpush +{{-- ^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + @endonce +{{--^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + +{{-- Custom Control Structures --}} + + @custom +{{--^^^^^^^ meta.embedded.blade source.blade meta.directive.blade variable.function.blade --}} +{{-- ^ - meta.function-call --}} + + @foo('bar', 'baz') +{{--^^^^^^^^^^^^^^^^^^ - meta.directive meta.directive --}} +{{--^^^^ meta.embedded.blade source.blade meta.directive.blade variable.function.blade --}} +{{-- ^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + + @datetime ( $var ) +{{--^^^^^^^^^^^^^^^^^^^ - meta.directive meta.directive --}} +{{--^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade variable.function.blade --}} +{{-- ^^ meta.embedded.blade source.blade meta.directive.blade - variable --}} +{{-- ^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + +{{-- Envoyer directives --}} + + @setup +{{--^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + $now = new DateTime(); + + $environment = isset($env) ? $env : "testing"; + @endsetup +{{--^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + + @servers(['web' => 'user@192.168.1.1']) +{{--^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + + @task('foo') +{{--^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + cd site + git pull origin {{ $branch }} + php artisan migrate + @endtask +{{--^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + + @after +{{--^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + @hipchat('token', 'room', 'Envoy') + @slack('hook', 'channel', 'message') + @endafter +{{--^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + + @story('deploy') +{{--^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + git + composer install + @endstory +{{--^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + + @component('layouts.app') +{{--^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + @slot('title') +{{-- ^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{-- ^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + Home Page + @endslot +{{-- ^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + +
    + @component('inc.alert') +{{-- ^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{-- ^^^^^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + This is the alert message here. + @endcomponent +{{-- ^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +

    Welcome

    +
    +
    + @component('inc.sidebar') +{{-- ^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{-- ^^^^^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + This is my sidebar text. + @endcomponent +{{-- ^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +
    + + @includeWhen(Auth::user(), 'nav.user') + @endcomponent +{{--^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + + @verbatim +{{--^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +
    + Hello, {{ $name }}. +{{-- ^^^^^^^^^^^ meta.interpolation.blade --}} +{{-- ^^ punctuation.section.interpolation.begin.blade - source.php --}} +{{-- ^^^^^^^ source.php.embedded.blade --}} +{{-- ^^^^^ variable.other.php --}} +{{-- ^^ punctuation.section.interpolation.end.blade - source.php --}} +
    + @endverbatim +{{--^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + +{{-- Helpers --}} + + @csrf + @dd('Compile the "dd" statements into valid PHP.') + @dump('Compile the "dump" statements into valid PHP') + @method('post') + +{{-- Validation Errors --}} + + @error('title') +{{--^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + @enderror +{{--^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + +{{-- Livewire --}} + + @livewireStyles +{{--^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + @livewireScripts +{{--^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + + @livewire('show-contact', ['contact' => $contact]) +{{--^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + +{{-- Environment Directives --}} + + @production +{{--^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + In Production + @endproduction +{{--^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + + @env('staging') +{{--^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + The application is running in "staging"... + @endenv +{{--^^^^^^^ meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} + +{{-- Conditional Classes --}} + + true, 'mr-2' => false])> +{{-- ^^^^^^ meta.tag.inline meta.embedded.blade source.blade meta.directive.blade keyword.control.directive.blade --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag.inline meta.embedded.blade source.blade meta.directive.arguments.blade --}} +{{-- ^^^^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + +{{-- Rendering JSON --}} + + @js($data, JSON_FORCE_OBJECT, 256) +{{--^^^ meta.embedded.blade source.blade meta.directive.blade - meta.directive meta.directive --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.embedded.blade source.blade meta.directive.arguments.blade - meta.directive meta.directive --}} +{{-- ^ - meta.embedded.blade source.blade meta.directive --}} +{{--^^^ keyword.control.directive.blade --}} +{{-- ^ punctuation.section.arguments.begin.blade - source.php --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.php.embedded.blade --}} +{{-- ^ punctuation.section.arguments.end.blade - source.php --}} + +{{-- https://github.com/Medalink/laravel-blade/issues/185 --}} + + +{{--^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag.other.html - invalid --}} + +{{--^^^^^^^^^^^^^^^ meta.tag.other.html - invalid --}} + + +{{--^^^^^^^^^^^^^^ meta.tag.other.html - invalid --}} + +{{--^^^^^^^^^ meta.tag.other.html - invalid --}} + +{{-- Quoted blade directive matching --}} + +

    Text

    +{{-- ^^^^^^^^^^^^^ meta.attribute-with-value.class.html meta.string.html string.quoted.double.html - meta.embedded.blade source.blade meta.directive --}} +{{-- ^^^^^^^^^^^^^ meta.attribute-with-value.class.html meta.string.html meta.embedded.blade source.blade meta.directive --}} +{{-- ^^^^^^^^^^^^^^ meta.attribute-with-value.class.html meta.string.html string.quoted.double.html - meta.embedded.blade source.blade meta.directive --}} +{{-- ^^^^^^ meta.attribute-with-value.class.html meta.string.html meta.embedded.blade source.blade meta.directive --}} +{{-- ^ meta.attribute-with-value.class.html meta.string.html string.quoted.double.html - meta.embedded.blade source.blade meta.directive --}} + +{{-- Complex conditional inline --}} + +

    Text

    +{{-- ^^^^^^^^^^^^^ meta.attribute-with-value.class.html meta.string.html string.quoted.double.html - meta.embedded.blade source.blade meta.directive --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.class.html meta.string.html meta.embedded.blade source.blade meta.directive --}} +{{-- ^^^^^^^^^^^^^^ meta.attribute-with-value.class.html meta.string.html string.quoted.double.html - meta.embedded.blade source.blade meta.directive --}} +{{-- ^^^^^^ meta.attribute-with-value.class.html meta.string.html meta.embedded.blade source.blade meta.directive --}} +{{-- ^ meta.attribute-with-value.class.html meta.string.html string.quoted.double.html - meta.embedded.blade source.blade meta.directive --}} + +{{-- Complex interpolation in embedded code --}} + +
    "> +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.style.html meta.string.html --}} +{{-- ^^^^^^^ source.css.embedded.html - meta.embedded.php --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.css.embedded.html meta.property-value.css meta.embedded.php --}} +{{-- ^^^ punctuation.section.embedded.begin.php --}} +{{-- ^^^^ support.function.builtin.php --}} +{{-- ^^^^^^^ meta.string.php string.quoted.double.php --}} +{{-- ^^^^^^ meta.string.php meta.interpolation.php variable.other.php --}} +{{-- ^ meta.string.php string.quoted.double.php punctuation.definition.string.end.php --}} +{{-- ^ punctuation.terminator.statement.php --}} +{{-- ^^ punctuation.section.embedded.end.php --}} +{{-- ^ punctuation.definition.string.end.html --}} +{{-- ^ meta.tag punctuation.definition.tag.end.html --}} + +
    +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.style.html meta.string.html --}} +{{-- ^^^^^^^ source.css.embedded.html - meta.interpolation.blade --}} +{{-- ^^^^^^^^^^^^^^^^^^^^ source.css.embedded.html meta.property-value.css meta.interpolation.blade --}} +{{-- ^^ punctuation.section.interpolation.begin.blade - source.php --}} +{{-- ^^^^^^^ meta.string.php string.quoted.double.php --}} +{{-- ^^^^^^ meta.string.php meta.interpolation.php variable.other.php --}} +{{-- ^ meta.string.php string.quoted.double.php punctuation.definition.string.end.php --}} +{{-- ^^ punctuation.section.interpolation.end.blade - source.php --}} +{{-- ^ punctuation.definition.string.end.html --}} +{{-- ^ meta.tag punctuation.definition.tag.end.html --}} + +
    )"> +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.event.html meta.string.html --}} +{{-- ^^^^^ source.js.embedded.html meta.function-call - meta.embedded.php --}} +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^ source.js.embedded.html meta.function-call meta.embedded.php --}} +{{-- ^^ source.js.embedded.html meta.function-call - meta.embedded.php --}} +{{-- ^ punctuation.section.group.begin.js --}} +{{-- ^^^ punctuation.section.embedded.begin.php --}} +{{-- ^^^^ support.function.builtin.php --}} +{{-- ^^^^^ meta.string.php string.quoted.double.php --}} +{{-- ^^^^^^ meta.string.php meta.interpolation.php variable.other.php --}} +{{-- ^ meta.string.php string.quoted.double.php punctuation.definition.string.end.php --}} +{{-- ^ punctuation.terminator.statement.php --}} +{{-- ^^ punctuation.section.embedded.end.php --}} +{{-- ^ punctuation.section.group.end.js --}} +{{-- ^ punctuation.definition.string.end.html --}} +{{-- ^ meta.tag punctuation.definition.tag.end.html --}} + +
    +{{-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.event.html meta.string.html --}} +{{-- ^^^^^ source.js.embedded.html meta.function-call - meta.interpolation.blade --}} +{{-- ^^^^^^^^^^^^^^^^^^ source.js.embedded.html meta.function-call meta.interpolation.blade --}} +{{-- ^^ source.js.embedded.html meta.function-call - meta.interpolation.blade --}} +{{-- ^ punctuation.section.group.begin.js --}} +{{-- ^^ punctuation.section.interpolation.begin.blade - source.php --}} +{{-- ^^^^^ meta.string.php string.quoted.double.php --}} +{{-- ^^^^^^ meta.string.php meta.interpolation.php variable.other.php --}} +{{-- ^ meta.string.php string.quoted.double.php punctuation.definition.string.end.php --}} +{{-- ^^ punctuation.section.interpolation.end.blade - source.php --}} +{{-- ^ punctuation.section.group.end.js --}} +{{-- ^ punctuation.definition.string.end.html --}} +{{-- ^ meta.tag punctuation.definition.tag.end.html --}}