Skip to content

Commit

Permalink
Allow if to be used as an unquoted string (#1431)
Browse files Browse the repository at this point in the history
Closes #1405
  • Loading branch information
nex3 committed Aug 10, 2021
1 parent 2beec36 commit 54d16c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## 1.37.6

* Allow `if` to be used as an unquoted string.

### Command Line Interface

* Strip CRLF newlines from snippets of the original stylesheet that are included
Expand Down
2 changes: 1 addition & 1 deletion lib/src/parse/stylesheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2612,7 +2612,7 @@ abstract class StylesheetParser extends Parser {
var identifier = interpolatedIdentifier();
var plain = identifier.asPlain;
if (plain != null) {
if (plain == "if") {
if (plain == "if" && scanner.peekChar() == $lparen) {
var invocation = _argumentInvocation();
return IfExpression(
invocation, identifier.span.expand(invocation.span));
Expand Down

0 comments on commit 54d16c0

Please sign in to comment.