Skip to content
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

refactor: remove unnecessary stuff #198

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexander-akait
Copy link
Collaborator

@alexander-akait alexander-akait commented Mar 19, 2019

Include:

  • Remove old/unnecessary stuff
  • Increase coverage
  • Refactor and fixes error message

No breaking changes (wrong)

word += this.requiredSpace(this.content(next));
this.position ++;
}
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need this code anymore, we already handle this case (based on history aded33a)

@coveralls
Copy link

coveralls commented Mar 19, 2019

Coverage Status

Coverage increased (+0.9%) to 96.255% when pulling c2d56fd on refactor-remove-unnecessary-stuff into 190f9bc on master.

@alexander-akait alexander-akait force-pushed the refactor-remove-unnecessary-stuff branch from 4b30cdb to 87e1dac Compare March 19, 2019 13:05
throws('misplaced parenthesis', ':not(', 'Expected a closing parenthesis.');
throws('misplaced parenthesis (2)', ':not)', 'Expected an opening parenthesis.');
throws('misplaced parenthesis (3)', ':not((', 'Expected a closing parenthesis.');
throws('misplaced parenthesis (4)', ':not))', 'Expected an opening parenthesis.');
Copy link
Collaborator Author

@alexander-akait alexander-akait Mar 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many errors was broken (throw invalid error on ( and )) because we don't validate message

this.error('Misplaced parenthesis.', {
index: this.nextToken[TOKEN.START_POS],
});
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need this, error should be throw in parentheses function

@alexander-akait alexander-akait force-pushed the refactor-remove-unnecessary-stuff branch from 87e1dac to db2651b Compare March 19, 2019 14:21
return node;
} else {
this.unexpected();
let nameRaw = this.content(this.tokens[this.position + 1]);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need isNamedCombinator, we already do this in combinator()

@alexander-akait alexander-akait force-pushed the refactor-remove-unnecessary-stuff branch from db2651b to c2d56fd Compare March 19, 2019 15:41
@alexander-akait alexander-akait changed the title [WIP] refactor: remove unnecessary stuff refactor: remove unnecessary stuff Mar 19, 2019
@alexander-akait
Copy link
Collaborator Author

alexander-akait commented Mar 19, 2019

Ready for review and need merge asap to continue work (avoid problem with merge)

t.deepEqual(tree.nodes[0].nodes[0].insensitive, false);
t.deepEqual(tree.nodes[0].nodes[0].raws.insensitiveFlag, 'qwer');
});

Copy link
Collaborator Author

@alexander-akait alexander-akait Mar 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just rename and add more, nothing changes

@jonathantneal
Copy link
Member

Is this good to merge, @evilebottnawi ?

@alexander-akait
Copy link
Collaborator Author

@jonathantneal no, i think here we have breaking change here, let's keep open for next major release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants