-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support elements in string interpolation.
- The code to evaluate a fragment is moved to a function so it can be re-used. - evalInline and evalTemplate now return Inlines instead of rendering them to Text. - A bit of code to convert those Inlines to Text is now added to Render.hs. The above points are just a bit of refactoring. - We add the Frag and Block case to evalExpr and evalInline. The above point makes our language more consistent as it now allows to use fragments in string interpolation expressions.
- Loading branch information
Showing
4 changed files
with
56 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,6 @@ | |
<p> | ||
Hello, 42. | ||
</p> | ||
<p> | ||
Hello, <a></a>. | ||
</p> |
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 |
---|---|---|
|
@@ -7,3 +7,4 @@ body | |
|
||
p Hello, #('Charlie'). | ||
p Hello, #(42). | ||
p Hello, #(a). |
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