-
Notifications
You must be signed in to change notification settings - Fork 28
Implement Fluent 0.5 Private Messages #35
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
Conversation
There seems to be some weird message coming from migration tests. Not sure if it's an error or not. Would appreciate if you took a look before merging. Except of that - merge at will :) |
What's the message? Do you mean |
That's what I see:
@stasm - any idea why? |
These are fine. |
fluent/syntax/ftlstream.py
Outdated
|
||
return (cc >= 48 and cc <= 57) or cc == 45 | ||
cc = ord(self.current_peek()[0]) |
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.
Why is this taking the first char of the current peek? In other places you're not doing it.
@@ -270,10 +277,11 @@ def get_variant_key(self, ps): | |||
if ch is None: | |||
raise ParseError('E0013') | |||
|
|||
if ps.is_number_start(): | |||
cc = ord(ch) | |||
if ((cc >= 48 and cc <= 57) or cc == 45): # 0-9, - |
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.
ps.is_number_start
sounds like the right choice here. Maybe we should fix the JS impl instead of removing it here?
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.
(I can do it in fluent.js
if you decide to change it here.)
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.
I don't know why but without this change it was breaking some tests. I didn't have time to investigate. Happy to port a patch if you write one for .js
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.
OK, let's leave it as-is for now, thanks!
bde80d8
to
05ccefa
Compare
@@ -73,20 +73,31 @@ def take_char(self, f): | |||
return ch | |||
return None | |||
|
|||
def is_id_start(self): | |||
if self.ch is None: | |||
def is_char_id_start(self, ch=None): |
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.
I didn't get to actually look at this patch in full, but this one triggered my early-morning brain. ch
should be an unconditional argument.
No description provided.