-
Notifications
You must be signed in to change notification settings - Fork 27.4k
fix(): allow spaces around dots for identifiers #8550
fix(): allow spaces around dots for identifiers #8550
Conversation
This is definitively a corner case and I'm not sure we want to support this but was looking into parser's code and saw #4613 so get a quick stab at it. For me we can just decide not to merge this one and close #4613 as won't fix. At the same time looks like someone bumped into this scenario and cared enough to open an issue... Anyway, it is here.... |
@@ -263,15 +263,17 @@ Lexer.prototype = { | |||
var ident = ''; | |||
var start = this.index; | |||
|
|||
var lastDot, peekIndex, methodName, ch; | |||
var lastDot, justSeenADot, peekIndex, methodName, ch; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally minor thing, but grammatically this would be: justSawADot
Thnx @lord2800 for the heads up, updated. |
ident += ch; | ||
} else { | ||
break; | ||
if (!(this.isWhitespace(ch) && justSawADot)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else if (!(this.isWhitespace(ch) && justSawADot)) {
break;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, right. Changing, thnx!
looks okay to me. I'm not sure if we want to support that, but I don't see an issue with being a tiny bit more flexible there. |
Fixes #4613