Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CommentNode to the AST #4009

Closed
wants to merge 2 commits into from
Closed

Commits on Mar 16, 2024

  1. Add CommentNode to the AST

    These nodes have no effect on compiled templates.
    
    Adding these to the TokenStream and AST enables extensions to add logic in
    node visitors, such as parsing PHPDoc-style `@var string name` comments.
    
    This in turn is invaluable for static code analysis of Twig templates as
    briefly discussed in [twigphp#4003](twigphp#4003) and in more detail in [TwigStan](https://github.com/alisqi/twig-stan/)'s README.
    drjayvee committed Mar 16, 2024
    Configuration menu
    Copy the full SHA
    07f1b8a View commit details
    Browse the repository at this point in the history
  2. Adjust code style

    drjayvee committed Mar 16, 2024
    Configuration menu
    Copy the full SHA
    4d41a2c View commit details
    Browse the repository at this point in the history