Skip to content

Special chars within single quotes #48

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

Open
hurry-man opened this issue Aug 24, 2017 · 2 comments
Open

Special chars within single quotes #48

hurry-man opened this issue Aug 24, 2017 · 2 comments

Comments

@hurry-man
Copy link

class: Nette\Mail\SmtpMailer([
   ...
   'password' => '}'
   ...
])

Seems that char } is not allowed. It says "unexpected token [Neon] }, expected [Neon] ]".
However, according to Neon sandbox it is possible.

@hurry-man
Copy link
Author

It seems that Nette itself evaluates the above expression as wrong. So the Neon sandbox is to blame, because it evaluates it as a valid expression. Please close this issue. Thanks.

@hurry-man
Copy link
Author

Well, it is my bad. The correct syntax is using : instead of => like this:

class: Nette\Mail\SmtpMailer([
   ...
   'password' => '}'   # error
   password: '}'   # correct
   ...
])

Then everything works as expected (neon sandbox, nette itself, and neon plugin in phpstorm).

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

1 participant