-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
An expression starting with paren ends on close.
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.
- Loading branch information
Showing
3 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@(arg: &str) | ||
|
||
<p>@arg</p> | ||
<p>@arg.@arg</p> | ||
<p>@arg.len()</p> | ||
<p>@(arg).len()</p> | ||
<p>@((2_i8 - 3).abs())</p>@* Note extra parens needed here *@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters