roc/crates/compiler/test_syntax/tests/snapshots/pass/expect_defs.moduledefs.roc
Joshua Warner 4f32f43048
Implement block / indent based parsing
... and enforce that defs can only occur in blocks (or, inside parenthesized expressions)
2024-07-27 13:34:16 -07:00

20 lines
645 B
Text

expect
html : Html {}
html =
Element "a" 43 [HtmlAttr "href" "https://www.roc-lang.org/"] [Text "Roc"]
actual : { nodes : List RenderedNode, siblingIds : List U64 }
actual =
indexNodes { nodes: [], siblingIds: [] } html
expected : { nodes : List RenderedNode, siblingIds : List U64 }
expected = {
nodes: [
RenderedText "Roc",
RenderedElement "a" { emptyRenderedAttrs & htmlAttrs: Dict.fromList [("href", "https://www.roc-lang.org/")] } [0],
],
siblingIds: [1],
}
(actual.nodes == expected.nodes)
&& (actual.siblingIds == expected.siblingIds)