php-zephir-parser icon indicating copy to clipboard operation
php-zephir-parser copied to clipboard

Class or var names with only capitalized letters makes compilation fails

Open sergeyklay opened this issue 7 years ago • 3 comments

From @mikachou on August 28, 2018 18:44

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

Copied from original issue: phalcon/zephir#1668

sergeyklay avatar Aug 29 '18 06:08 sergeyklay

From @mikachou on August 28, 2018 18:48

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

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

sergeyklay avatar Aug 29 '18 06:08 sergeyklay

From @danhunsaker on August 28, 2018 19:0

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 avatar Aug 29 '18 06:08 sergeyklay

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

sergeyklay avatar Aug 29 '18 06:08 sergeyklay