Closed Rifhutch closed 6 years ago
As far as I can tell, this is the correct behavior according to the spec. I have clipped the relevant lines:
For the keywords
true
,false
,nothing
,nobody
andnowhere
, a poetic assignment is a single line consisting of a variable name, theis
keyword and the required value literalA poetic string literal assignment starts with a variable name, followed by one of the keywords
says
followed by a single space. The rest of the line up to the\n
terminator is treated as an unquoted string literal.
This makes it clear that those 5 things are the only things allowed after is
that isn't a numeric literal. I'm actually more generous than the spec, I will give you any of the true
, false
, null
, or mysterious
aliases for their values. Without is an alias for minus
which, as this is (and cannot be) part of a math expression, isn't needed to be replaced.
A note on the replacement with -
, that's a implementation detail of rockstar-py.
From what I can tell, this is actually a bug in rockstar-py, I can file it :)
Not a bug, the specs are clear
Consider the poetic assignment my girl is without
It looks like 'without' is being read as a (non-reserved) 7 letter word.
But reserved words I believe should be resolved to their aliases (in this case '-') which isn't alphabetical, so the result would just be a poetic numeric assignment based on a 0 length string? Admittedly, the case where the right hand side is a reserved word could be a little clearer in the spec.