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

Single quote syntax #15

Open
wolfgang42 opened this issue Jul 25, 2018 · 4 comments
Open

Single quote syntax #15

wolfgang42 opened this issue Jul 25, 2018 · 4 comments
Milestone

Comments

@wolfgang42
Copy link
Owner

Has been changed in spec, but also the original implementation probably wasn't right anyway.

Relevant bit of the spec:

  1. The sequence 's\W+ - a single quote followed by a lowercase 's' and one or more whitespace characters - should be replaced with is (space, is, space)
  • This allows Janie's got a gun (initialises Janie with the value 313) and Union's been on strike (initialise Union with the value 426) as valid variable declarations.
  1. All other single quotes are then ignored. ain't is equivalent to aint, wakin' has five letters, and ''''' is equal to the empty string. This means you can use single quotes freely throughout your program to punctuate, adjust word lengths and generally channel the spirit of rock'n'roll without worrying about compiler errors.
@wolfgang42 wolfgang42 added the ready Ready for development label Jul 25, 2018
@wolfgang42 wolfgang42 added this to the Spec Complete milestone Jul 25, 2018
@wolfgang42
Copy link
Owner Author

Currently awaiting clarification on this as it's not clear to me how some edge cases are supposed to work: https://github.com/dylanbeattie/rockstar/issues/45#issuecomment-407917446

@wolfgang42 wolfgang42 removed the ready Ready for development label Jul 25, 2018
@yyyyyyyan
Copy link

I changed rockstar-py to match the new specs, but you're right. Jane is Mark's girlfriend is converting Mark's to Mark is, adding 1 to the number value. I can solve that pretty quickly tomorrow, but that's not clearly specified

@yyyyyyyan
Copy link

I think it'd be better if 's could only be converted to is if it's on the first word of the sentence. It'd be much much easier

@wolfgang42
Copy link
Owner Author

First word only wouldn't work as expected for multi-word proper variables.

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