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

added position dump for unparsed selectors #98

Merged
merged 1 commit into from
Jun 26, 2015
Merged

Conversation

mbardauskas
Copy link
Contributor

Otherwise it is really hard to find empty selectors, like the following (note the last comma):
input.input-text, select, textarea, button, {}

@macbre macbre added this to the v0.10 milestone Jun 17, 2015
@@ -227,7 +227,8 @@ analyzer.prototype = {
parsedSelector = slickParse(selector)[0];

if (typeof parsedSelector === 'undefined') {
throw 'Unable to parse "' + selector + '" selector';
var positionDump = "Rule position start: " + rule.position.start.line + ',' + rule.position.start.column + "; end: " + rule.position.end.line + ',' + rule.position.end.column;
Copy link
Owner

Choose a reason for hiding this comment

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

Let's be consistent and use the following convention when printing line numbers and columns:

'start @ ' + position.line + ':' + position.column

@macbre
Copy link
Owner

macbre commented Jun 17, 2015

Thanks for the pull request!

Please add a test case for handling errors in such case to test/errors.js file

macbre pushed a commit that referenced this pull request Jun 26, 2015
added position dump for unparsed selectors
@macbre macbre merged commit a78c3b8 into macbre:devel Jun 26, 2015
macbre added a commit that referenced this pull request Jun 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants