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 @@
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 - -This is user {{ $user->id }}
-@endforeach - -@forelse($users as $user) -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 - -Paragraph
-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 --}} + + = $name; ?> +{{--^^^^^^^^^^^^^ 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 --}} + +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 --}} +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 + +Paragraph
+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 --}} + +