EmranMR / tree-sitter-blade

tree-sitter grammar for Laravel blade files
MIT License
186 stars 8 forks source link

Implement Template Inheritance #10

Closed EmranMR closed 1 year ago

EmranMR commented 1 year ago

Old fashion Laravel apps might be using Template Inheritance.

Add support for the following:

  1. @section('test)
     test
    @show
  2. Support for @parent keyword inside @section

    • Might be a good idea to just add to the keyword rule as it will get the job done.
EmranMR commented 1 year ago

inline @section() proven to be difficult to implement. ❌ It conflicts with the "nested" @section directives. Parser throws an error looking for the closing directive. Things tried:

Regardless you either get inlineSection or the nested both throwing an error. 😬