From 594809e35b9e768f1a50926cf5e7a9df41ba7d16 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 17 Aug 2021 22:04:18 +0200 Subject: Library functions behave more imperatively - Templates scope state changes - State-modifying function operate in place instead of returning a template - Internal template representation contains actual owned nodes instead of a pointer to a syntax tree + an expression map - No more wide calls --- tests/typ/code/call.typ | 34 +--------------------------------- tests/typ/code/ops.typ | 2 +- 2 files changed, 2 insertions(+), 34 deletions(-) (limited to 'tests/typ/code') diff --git a/tests/typ/code/call.typ b/tests/typ/code/call.typ index 92ac17ae..ffd91769 100644 --- a/tests/typ/code/call.typ +++ b/tests/typ/code/call.typ @@ -5,7 +5,7 @@ // Ref: true // Ommitted space. -#font(weight:bold)[Bold] +[#font(weight:bold)Bold] // Call return value of function with body. #let f(x, body) = (y) => [#x] + body + [#y] @@ -20,35 +20,6 @@ #f()[A] #f([A]) ---- -// Ref: true - -// Test multiple wide calls in separate expressions inside a template. -[ - #font!(fill: eastern) - First - #font!(fill: forest) - Second -] - -// Test wide call in heading. -= A #align!(right) B -C - ---- -// Test wide call in expression. - -// Error: 2-4 wide calls are only allowed directly in templates -{f!()} - -// Error: 5-7 wide calls are only allowed directly in templates -#g!(f!()) - ---- -// Test wide call evaluation semantics. -#let x = 1 -#let f(x, body) = test(x, 1) -#f!(x) -{ x = 2 } - --- // Trailing comma. #test(1 + 1, 2,) @@ -90,9 +61,6 @@ C #f[1](2) --- -// Error: 7 expected argument list -#func! - // Error: 7-8 expected expression, found colon #func(:) diff --git a/tests/typ/code/ops.typ b/tests/typ/code/ops.typ index d77c7503..201f86da 100644 --- a/tests/typ/code/ops.typ +++ b/tests/typ/code/ops.typ @@ -4,7 +4,7 @@ --- // Test template addition. // Ref: true -{[*Hello ] + [world!*]} +{[*Hello ] + [world!]} --- // Test math operators. -- cgit v1.2.3