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

Class or var names with only capitalized letters makes compilation fails #1668

Closed
mikachou opened this issue Aug 28, 2018 · 4 comments
Closed

Comments

@mikachou
Copy link

For instance if my class name is RBF, then declare
class RBF
makes the compilator fails when i launch zephir build, but not if my class name is RbF or rBF.

The same thing occurs with vars, for instance : I can name a var Lu, or LuL, but not LU. I cannot have a variable name which is A because zephir build fails

@mikachou
Copy link
Author

mikachou commented Aug 28, 2018

I forgot to precise : the same error message is displayed with error :

Syntax error in xxx/yyy on line zzz
class RBF
--------^

@danhunsaker
Copy link
Contributor

danhunsaker commented Aug 28, 2018

Hmm. We may have classified all-uppercase names as reserved for constants. If that's the case, this is expected behavior, but should be documented...

@sergeyklay
Copy link
Contributor

@mikachou It is common parser issue - using all-uppercase names.

@sergeyklay
Copy link
Contributor

This issue was moved to zephir-lang/php-zephir-parser#39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants