tree-sitter/tree-sitter-php

Error when foreach loop is written with capitalized 'AS' keyword

yuanzhenbd opened this issue · 2 comments

Agreestore.txt

when i analyze the php file above, appear the bug in img:
image

you can test use the file above, change the file file Extension before use.

It looks like the parse error is caused by this:

foreach ($rank_list AS $item) {
  // ...
}

Currently, the grammar does not recognize the capitalized AS. Thank you very much for the report!

I'm glad you helped us find this; it is fixed on master. Please let us know if you have other unexpected parse errors.