Skip to content

Commit

Permalink
Add information re: comment nodes to README
Browse files Browse the repository at this point in the history
See twigphp/Twig#4009 for more details
  • Loading branch information
drjayvee committed Mar 16, 2024
1 parent 9de0537 commit 3219510
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,15 @@ One seemingly simple is that there's no way to distinguish whether a `macro` arg
an implicit one. `ExpressionParser->parseArguments()` (line 628) will create identical ASTs for both.

Another is that comments are not added to the AST at all (see `Lexer->lexComment()`), making it impossible to process
type hints in `@var` comments.
type hints in `@var` comments. Support for this has been added in
[a Twig PR](https://github.com/twigphp/Twig/pull/4009). Let's 🤞 this gets merged!

# Inspections
Here's a list of inspections considered relevant.

Those marked with ❌ are (considered) impossible to implement with the current design given the limitations.

Most, if not all, of these inspections depend on the ability to inspect comments.
Most, if not all, of these inspections depend on the ability to inspect comments, and can't be implemented *yet*.

## Variable types
* ❌ Invalid type (e.g., `{# @var i nit #}`)
Expand Down

0 comments on commit 3219510

Please sign in to comment.