-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure that set rule doesn't pick up if on next line.
Closes #23.
- Loading branch information
Showing
3 changed files
with
91 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,77 @@ | ||
--- parse tree --- | ||
[ Code | ||
"test/typ/regression/issue23.typ" | ||
( line 1 , column 2 ) | ||
(Let | ||
(BasicBind (Just (Identifier "test"))) | ||
(FuncExpr | ||
[ NormalParam (Identifier "x") , NormalParam (Identifier "y") ] | ||
(Block | ||
(CodeBlock | ||
[ If | ||
[ ( Equals (Ident (Identifier "x")) (Ident (Identifier "y")) | ||
, Block (Content [ Text "\9989" ]) | ||
) | ||
, ( Literal (Boolean True) | ||
, Block | ||
(Content | ||
[ Text "\10060" | ||
, Text "(" | ||
, Code | ||
"test/typ/regression/issue23.typ" | ||
( line 1 , column 47 ) | ||
(FuncCall | ||
(Ident (Identifier "repr")) | ||
[ NormalArg (Ident (Identifier "x")) ]) | ||
, Space | ||
, Text "/" | ||
, Text "=" | ||
, Space | ||
, Code | ||
"test/typ/regression/issue23.typ" | ||
( line 1 , column 59 ) | ||
(FuncCall | ||
(Ident (Identifier "repr")) | ||
[ NormalArg (Ident (Identifier "y")) ]) | ||
, Text ")" | ||
]) | ||
) | ||
] | ||
])))) | ||
, SoftBreak | ||
, Code | ||
"test/typ/regression/issue23.typ" | ||
( line 2 , column 2 ) | ||
(LetFunc | ||
(Identifier "fn") | ||
[] | ||
(Block | ||
(CodeBlock | ||
[ Set | ||
(Ident (Identifier "text")) | ||
[ KeyValArg (Identifier "fill") (Ident (Identifier "red")) ] | ||
, If | ||
[ ( Literal (Boolean True) | ||
, Block (Content [ SoftBreak , Text "test" , ParBreak ]) | ||
) | ||
, ( Literal (Boolean True) | ||
, Block (Content [ SoftBreak , Text "test2" , ParBreak ]) | ||
) | ||
] | ||
]))) | ||
, ParBreak | ||
, Code | ||
"test/typ/regression/issue23.typ" | ||
( line 11 , column 2 ) | ||
(FuncCall (Ident (Identifier "fn")) []) | ||
, ParBreak | ||
] | ||
--- evaluated --- | ||
document(body: { text(body: [ | ||
]), | ||
parbreak(), | ||
text(body: [ | ||
test], | ||
fill: rgb(100%,25%,21%,100%)), | ||
parbreak(), | ||
parbreak() }) |
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,10 @@ | ||
#let fn() = { | ||
set text(fill: red) | ||
if true [ | ||
test | ||
] else [ | ||
test2 | ||
] | ||
} | ||
|
||
#fn() |