summaryrefslogtreecommitdiff
path: root/src/syntax/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/syntax/mod.rs')
-rw-r--r--src/syntax/mod.rs25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/syntax/mod.rs b/src/syntax/mod.rs
index d1fc6b77..41fba134 100644
--- a/src/syntax/mod.rs
+++ b/src/syntax/mod.rs
@@ -60,7 +60,7 @@ mod tests {
roundtrip("hi");
// Heading.
- roundtrip("# *Ok*");
+ roundtrip("= *Ok*");
// Raw.
roundtrip("`lang 1`");
@@ -94,9 +94,9 @@ mod tests {
roundtrip("{(a: 1, b: 2)}");
// Templates.
- roundtrip("{[]}");
- roundtrip("{[*Ok*]}");
- roundtrip("{[[f]]}");
+ roundtrip("[]");
+ roundtrip("[*Ok*]");
+ roundtrip("{[f]}");
// Groups.
roundtrip("{(1)}");
@@ -105,6 +105,7 @@ mod tests {
roundtrip("{}");
roundtrip("{1}");
roundtrip("{ #let x = 1; x += 2; x + 1 }");
+ roundtrip("[{}]");
// Operators.
roundtrip("{-x}");
@@ -116,14 +117,14 @@ mod tests {
roundtrip("{v(1)}");
roundtrip("{v(a: 1, b)}");
- // Bracket calls.
- roundtrip("[v]");
- roundtrip("[v 1]");
- roundtrip("[v 1, 2][*Ok*]");
- roundtrip("[v 1 | f 2]");
- roundtrip("{[[v]]}");
- test("[v 1, [[f 2]]]", "[v 1 | f 2]");
- test("[v 1, 2][[f 3]]", "[v 1, 2 | f 3]");
+ // Function templates.
+ roundtrip("#[v]");
+ roundtrip("#[v 1]");
+ roundtrip("#[v 1, 2][*Ok*]");
+ roundtrip("#[v 1 | f 2]");
+ roundtrip("{#[v]}");
+ test("#[v 1, #[f 2]]", "#[v 1 | f 2]");
+ test("#[v 1, 2][#[f 3]]", "#[v 1, 2 | f 3]");
// Keywords.
roundtrip("#let x = 1 + 2");