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

All-uppercase names specially highlighted #3

Open
Siguza opened this issue Jan 1, 2015 · 4 comments
Open

All-uppercase names specially highlighted #3

Siguza opened this issue Jan 1, 2015 · 4 comments

Comments

@Siguza
Copy link

Siguza commented Jan 1, 2015

All-uppercase names receive a special highlighting (bold orange-yellow for me).

Try with:

class ALLUPPERCASENAME
{}

Below is the generated HTML from Atom:

<span class="source js">
    <span class="storage type js">class</span>
    <span class="string regexp js">ALLUPPERCASENAME</span>
    <span class="meta brace curly js">{}</span>
</span>
@Siguza Siguza changed the title All-uppercase names especially highlighted All-uppercase names specially highlighted Jan 1, 2015
@nkt
Copy link
Contributor

nkt commented Jan 2, 2015

Because in Zephir all uppercase named variables are constants.

@Siguza
Copy link
Author

Siguza commented Jan 2, 2015

Alright, gives a syntax error when used as class name. Still:

namespace some\UPPERCASE\namespace;

@nkt
Copy link
Contributor

nkt commented Jan 2, 2015

Yep. That happens because Zephir parser recognize [A-Z][A-Z0-9_]* as constants.

@Siguza
Copy link
Author

Siguza commented Jan 2, 2015

Isn't it [A-Z_][A-Z0-9_]*?
Anyway, the actual Zephir parses allows those pattern in namespaces, so I think the atom syntax should reflect that, right?

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

2 participants