Skip to content

Parser #139

Description

@lonnieezell

The parser as we have it now is anemic and barely worth using. It should be expanded to something work keeping, without making it a full-blown template system. At the very least I feel it should:

  • Support the current single and loop tags
  • Support some form of "if/else" combo, or similar, to handle if we don't have data display error message.
  • Allow parsing of PHP to be completely disabled
  • Allow for custom tags, potentially like ExpressionEngine with a {plugin:method attributes} syntax.
  • Allow noparse blocks
  • Allow comments in template
  • Allow chainable "filters" that can modify a variable before display

I think this creates enough to be useful out of the box, but allows it to be expanded as much as someone would like it to be. I think Lex can serve as great inspiration for much of this.

Open to comments and discussion, but this is my current thinking.

Development Checklist:

  • Component(s)
  • ... with PHPdocs
  • Unit testing
  • ... with >80% coverage
  • User guide updated
  • Classmap integration?
  • Securely signed commits
  • Conforms to style guide

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions