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

sclang: Can't use a symbol literal consisting of a number followed by letter(s) #2673

Open
mossheim opened this issue Jan 21, 2017 · 5 comments
Labels
API change bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. comp: sclang sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library"
Milestone

Comments

@mossheim
Copy link
Contributor

mossheim commented Jan 21, 2017

\1a // error!

// and yet

\a1 // fine
\12 // fine
\ab // fine
'1a' // fine

Is there a good reason for this? I discovered this quirk while digging through PyrLexer.

@mossheim mossheim changed the title sclang: Can't declare a symbol consisting of a number followed by letter(s) sclang: Can't use a symbol literal consisting of a number followed by letter(s) Jan 21, 2017
@nhthn nhthn added bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. comp: sclang sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library" labels Jan 21, 2017
@telephon
Copy link
Member

It has been generally known forever, but I don't remember any reason. Would be nicer if it worked.

@mossheim
Copy link
Contributor Author

Ok! It's a very trivial change in the lexer, I'll submit a PR when I have time.

@nhthn
Copy link
Contributor

nhthn commented Jan 22, 2017

I figured out why. It's those key binary operators again (see #2568).

\1asString: 1234 == "1"

So #2676 is a behavior change, but it only changes stupid behavior.

@mossheim
Copy link
Contributor Author

Do you think that's worth considering before we make the change? I highly doubt anyone is relying on that in their code.

@nhthn
Copy link
Contributor

nhthn commented Jan 22, 2017

Agreed, we should just document the change.

@nhthn nhthn modified the milestones: 3.9, 3.9.x Oct 28, 2017
@mossheim mossheim removed their assignment Apr 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API change bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. comp: sclang sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library"
Projects
None yet
Development

No branches or pull requests

3 participants