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

Fixes #2824 - Expressions require a delimiter of some kind in mixin args #3258

Merged
merged 2 commits into from
Jul 11, 2018

Conversation

matthew-dean
Copy link
Member

@matthew-dean matthew-dean commented Jul 4, 2018

Fixes #2824

@matthew-dean matthew-dean changed the title Expressions require a delimiter of some kind in mixin args Fixes #2824 - Expressions require a delimiter of some kind in mixin args Jul 4, 2018
Copy link
Member

@calvinjuarez calvinjuarez left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -953,7 +953,7 @@ var Parser = function Parser(context, imports, fileInfo) {
arg = entities.variable() || entities.property() || entities.literal() || entities.keyword() || this.call(true);
}

if (!arg) {
if (!arg || !hasSep) {
Copy link
Member

Choose a reason for hiding this comment

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

Will this ever evaluate to true? It looks like hasSep isn't touched between hasSep = true and !hasSep. Unless there's some kind of non-linear code happening that would set it.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's set per loop. The first time it's true; that's intentional because it doesn't need a separator. Then it continues to be set by the presence of a separator, but depends on what type during the loop. So if ever it finishes without detecting a true separation of args, it should fail... I think. It seems to work? lol

Copy link
Member

Choose a reason for hiding this comment

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

Good enough for me.

@matthew-dean matthew-dean reopened this Jul 8, 2018
@matthew-dean matthew-dean merged commit d99a1b8 into less:master Jul 11, 2018
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.

2 participants