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

An expression starting with paren ends on close. #65

Merged
merged 3 commits into from
Dec 14, 2019
Merged

Conversation

kaj
Copy link
Owner

@kaj kaj commented Dec 11, 2019

BREAKING CHANGE. If an expression starts with an open parenthesis, the expression ends on the closing parenthesis (and that outer parenthesis is not part of the expression.

This fixes cases where an expression is immediately followed by something that could be part of the expression.

Before this change, calling a function on the result of some subexpression could be written as @(a - b).abs(). After this change, that should be changed to @((a - b).abs()) unless the intent is to have the result of (a - b) followed by the template string .abs().

Fixes #64.

BREAKING CHANGE.  If an expession starts with an open parenthesis, the
expression ends on the closing parenthesis (and that outer parenthesis
is not part of the expression.

This fixes cases where an expression is immediately followed by
something that could be part of the expression.

Before this change, calling a function on the result of some
subexpression could be written as `@(a - b).abs()`.  After this
change, that should be changed to `@((a - b).abs())` unless the intent
is to have the result of (a - b) followed by the template string
`.abs()`.

Fixes #64.
Everything that is allowed in parenthesis inside an expression should
be allowed when that parenthesis is the entire expression.
@kaj kaj merged commit a11a21c into master Dec 14, 2019
@kaj kaj deleted the end-expression branch December 14, 2019 16:27
kaj added a commit that referenced this pull request Dec 25, 2019
* PR #65, Issue #64: An expression starting with paren ends on close.
* RucteError now implements std::error::Error.
* Specify which references in examples are `dyn` or `impl`.
* Remove a useless string clone.
* Update rsass to 0.12.0.

Thanks to @Aunmag.
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.

Escape dots - end of expression
1 participant