- 
  Notifications
 
You must be signed in to change notification settings  - Fork 11
 
fixed evaluation of properties named property #23
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
 
 
 src/api.js
 
 Outdated
 
 
 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.
Hm. Linter didn't catch this for some reason, but there is no need for nested ifs here, just use a single one:
if (S.token.value == "property" && (S.token.type == "name" || S.token.value == "var") && !is_token(peek(), "punc", ":")) { next(); return qmlpropdef(); }
Upd: ah, we don't have linter enabled in this repo.
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.
Btw, S.token.value == "property" && (S.token.type == "name" || S.token.value == "var") could be reduced to S.token.value == "property" && S.token.type == "name", perhaps this means that there is some other bug somewhere.
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.
Good point, token.value should never be property and var at the same time.
LGTM with a nit (unnecessary if nesting).
Thanks!
e9c1a0c to
 cb81dbe  
 Compare
 
 PR-URL: #23 Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
PR-URL: #23 Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Awesome! When will you publish the next release?
@machinekoder 
qmlweb-parser — just published 0.3.1.
qmlweb — not sure yet, I was hoping to finish some more structural changes before 0.2.0, but I might postpone those and release 0.2.0 pretty soon instead.
Fixes qmlweb/qmlweb#346