Last active
September 13, 2018 12:17
-
-
Save FrigoEU/4f351a8e3c2bc86524c2f24bc2c409f1 to your computer and use it in GitHub Desktop.
Pretty Printing Ur
This file contains hidden or 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
Pretty Printing Ur | |
Ur Definition Rules | |
val -> Ur Expression Rules | |
fun so align arguments and result -> Ur Expression Rules | |
comments -> Comment Rules | |
Ur Expression Rules | |
let -> Let Binding Rules | |
case of so pretty print -> Ur Expression Rules | |
Open angular brackets -> XML Tag Rules | |
Open Xml Tags -> XML Content Rules | |
Open Parentheses -> Shift two chars | |
Open Curly Braces -> Align commas with curlies | |
Open Square Brackets -> Align commas with squares | |
comments -> Comment Rules | |
Let Binding Rules | |
val or fun so shift two chars -> Ur Definition Rules | |
in so shift two chars -> Ur Expression Rules | |
comments -> Comment Rules | |
XML Tag Rules | |
Open Curly braces? -> Ur Expression Rules | |
Open quotes? -> Outline by first char | |
Else -> Outline by first attribute first char | |
comments -> Comment Rules | |
XML Content Rules | |
Shift by two | |
Outline by first attribute first char | |
Outline by first char | |
Shift two chars | |
Align commas with curlies | |
Align commas with squares |
This file contains hidden or 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
function render(model){ | |
let current_state_name = model.active_states[0].name; | |
return $("h1", | |
{style: {color: "darkBlue"}}, | |
`The current state is: ${current_state_name}`); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment