support number to find children #1

Merged
Nexucis merged 1 commit from feature/support-id into master 2020-11-03 21:37:38 +01:00
Nexucis commented 2020-11-03 20:57:14 +01:00 (Migrated from github.com)
should fix https://github.com/lezer-parser/lezer/issues/37
marijnh (Migrated from github.com) reviewed 2020-11-03 21:13:26 +01:00
@ -130,10 +130,13 @@ export class NodeType {
marijnh (Migrated from github.com) commented 2020-11-03 21:13:26 +01:00

Since we're going to need to do this typeof check anyway, I'd prefer to also move the initial comparison into the conditional.

And please try to use a code style similar to the surrounding code—space after if and before the brace, and == instead of === whenever possible.

Since we're going to need to do this `typeof` check anyway, I'd prefer to also move the initial comparison into the conditional. And please try to use a code style similar to the surrounding code—space after `if` and before the brace, and `==` instead of `===` whenever possible.
marijnh commented 2020-11-03 21:14:27 +01:00 (Migrated from github.com)

Thanks. I added a comment with two small issues.

Thanks. I added a comment with two small issues.
Nexucis (Migrated from github.com) reviewed 2020-11-03 21:29:31 +01:00
@ -130,10 +130,13 @@ export class NodeType {
Nexucis (Migrated from github.com) commented 2020-11-03 21:29:31 +01:00

thanks for the review :). Is it better like this ?

thanks for the review :). Is it better like this ?
Nexucis (Migrated from github.com) reviewed 2020-11-03 21:33:31 +01:00
@ -130,10 +130,13 @@ export class NodeType {
Nexucis (Migrated from github.com) commented 2020-11-03 21:33:30 +01:00

just in case, we can replace the condition group ? group.indexOf(name) > -1 : false by just group && group.indexOf(name) > -1. It will avoid the ternary condition.

I can change it as well if you want

just in case, we can replace the condition `group ? group.indexOf(name) > -1 : false` by just `group && group.indexOf(name) > -1`. It will avoid the ternary condition. I can change it as well if you want
marijnh commented 2020-11-03 21:37:43 +01:00 (Migrated from github.com)

Thanks!

Thanks!
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lezer/common!1
No description provided.