--- parse tree --- [ Code "test/typ/compiler/string-18.typ" ( line 1 , column 2 ) (Let (BasicBind (Just (Identifier "test"))) (FuncExpr [ NormalParam (Identifier "x") , NormalParam (Identifier "y") ] (Block (CodeBlock [ If [ ( Equals (Ident (Identifier "x")) (Ident (Identifier "y")) , Block (Content [ Text "\9989" ]) ) , ( Literal (Boolean True) , Block (Content [ Text "\10060" , Text "(" , Code "test/typ/compiler/string-18.typ" ( line 1 , column 47 ) (FuncCall (Ident (Identifier "repr")) [ NormalArg (Ident (Identifier "x")) ]) , Space , Text "/" , Text "=" , Space , Code "test/typ/compiler/string-18.typ" ( line 1 , column 59 ) (FuncCall (Ident (Identifier "repr")) [ NormalArg (Ident (Identifier "y")) ]) , Text ")" ]) ) ] ])))) , SoftBreak , Comment , Code "test/typ/compiler/string-18.typ" ( line 3 , column 2 ) (Let (BasicBind (Just (Identifier "str"))) (Literal (String "Typst, LaTeX, Word, InDesign"))) , SoftBreak , Code "test/typ/compiler/string-18.typ" ( line 4 , column 2 ) (Let (BasicBind (Just (Identifier "array"))) (Array [ Reg (Literal (String "Typst")) , Reg (Literal (String "LaTeX")) , Reg (Literal (String "Word")) , Reg (Literal (String "InDesign")) ])) , SoftBreak , Code "test/typ/compiler/string-18.typ" ( line 5 , column 2 ) (FuncCall (Ident (Identifier "test")) [ NormalArg (FuncCall (FieldAccess (Ident (Identifier "map")) (FuncCall (FieldAccess (Ident (Identifier "split")) (Ident (Identifier "str"))) [ NormalArg (Literal (String ",")) ])) [ NormalArg (FuncExpr [ NormalParam (Identifier "s") ] (FuncCall (FieldAccess (Ident (Identifier "trim")) (Ident (Identifier "s"))) [])) ]) , NormalArg (Ident (Identifier "array")) ]) , SoftBreak , Code "test/typ/compiler/string-18.typ" ( line 6 , column 2 ) (FuncCall (Ident (Identifier "test")) [ NormalArg (FuncCall (FieldAccess (Ident (Identifier "trim")) (Literal (String ""))) []) , NormalArg (Literal (String "")) ]) , SoftBreak , Code "test/typ/compiler/string-18.typ" ( line 7 , column 2 ) (FuncCall (Ident (Identifier "test")) [ NormalArg (FuncCall (FieldAccess (Ident (Identifier "trim")) (Literal (String " abc "))) [ KeyValArg (Identifier "at") (Ident (Identifier "start")) ]) , NormalArg (Literal (String "abc ")) ]) , SoftBreak , Code "test/typ/compiler/string-18.typ" ( line 8 , column 2 ) (FuncCall (Ident (Identifier "test")) [ NormalArg (FuncCall (FieldAccess (Ident (Identifier "trim")) (Literal (String " abc "))) [ KeyValArg (Identifier "at") (Ident (Identifier "end")) , KeyValArg (Identifier "repeat") (Literal (Boolean True)) ]) , NormalArg (Literal (String " abc")) ]) , SoftBreak , Code "test/typ/compiler/string-18.typ" ( line 9 , column 2 ) (FuncCall (Ident (Identifier "test")) [ NormalArg (FuncCall (FieldAccess (Ident (Identifier "trim")) (Literal (String " abc"))) [ KeyValArg (Identifier "at") (Ident (Identifier "start")) , KeyValArg (Identifier "repeat") (Literal (Boolean False)) ]) , NormalArg (Literal (String "abc")) ]) , SoftBreak , Code "test/typ/compiler/string-18.typ" ( line 10 , column 2 ) (FuncCall (Ident (Identifier "test")) [ NormalArg (FuncCall (FieldAccess (Ident (Identifier "trim")) (Literal (String "aabcaa"))) [ NormalArg (Literal (String "a")) , KeyValArg (Identifier "repeat") (Literal (Boolean False)) ]) , NormalArg (Literal (String "abca")) ]) , SoftBreak , Code "test/typ/compiler/string-18.typ" ( line 11 , column 2 ) (FuncCall (Ident (Identifier "test")) [ NormalArg (FuncCall (FieldAccess (Ident (Identifier "trim")) (Literal (String "aabca"))) [ NormalArg (Literal (String "a")) , KeyValArg (Identifier "at") (Ident (Identifier "start")) ]) , NormalArg (Literal (String "bca")) ]) , SoftBreak , Code "test/typ/compiler/string-18.typ" ( line 12 , column 2 ) (FuncCall (Ident (Identifier "test")) [ NormalArg (FuncCall (FieldAccess (Ident (Identifier "trim")) (Literal (String "aabcaa"))) [ NormalArg (Literal (String "a")) , KeyValArg (Identifier "at") (Ident (Identifier "end")) , KeyValArg (Identifier "repeat") (Literal (Boolean False)) ]) , NormalArg (Literal (String "aabca")) ]) , SoftBreak , Code "test/typ/compiler/string-18.typ" ( line 13 , column 2 ) (FuncCall (Ident (Identifier "test")) [ NormalArg (FuncCall (FieldAccess (Ident (Identifier "trim")) (Literal (String ""))) [ NormalArg (FuncCall (Ident (Identifier "regex")) [ NormalArg (Literal (String ".")) ]) ]) , NormalArg (Literal (String "")) ]) , SoftBreak , Code "test/typ/compiler/string-18.typ" ( line 14 , column 2 ) (FuncCall (Ident (Identifier "test")) [ NormalArg (FuncCall (FieldAccess (Ident (Identifier "trim")) (Literal (String "123abc456"))) [ NormalArg (FuncCall (Ident (Identifier "regex")) [ NormalArg (Literal (String "\\d")) ]) ]) , NormalArg (Literal (String "abc")) ]) , SoftBreak , Code "test/typ/compiler/string-18.typ" ( line 15 , column 2 ) (FuncCall (Ident (Identifier "test")) [ NormalArg (FuncCall (FieldAccess (Ident (Identifier "trim")) (Literal (String "123abc456"))) [ NormalArg (FuncCall (Ident (Identifier "regex")) [ NormalArg (Literal (String "\\d")) ]) , KeyValArg (Identifier "repeat") (Literal (Boolean False)) ]) , NormalArg (Literal (String "23abc45")) ]) , SoftBreak , Code "test/typ/compiler/string-18.typ" ( line 16 , column 2 ) (FuncCall (Ident (Identifier "test")) [ NormalArg (FuncCall (FieldAccess (Ident (Identifier "trim")) (Literal (String "123a4b5c678"))) [ NormalArg (FuncCall (Ident (Identifier "regex")) [ NormalArg (Literal (String "\\d")) ]) , KeyValArg (Identifier "repeat") (Literal (Boolean True)) ]) , NormalArg (Literal (String "a4b5c")) ]) , SoftBreak , Code "test/typ/compiler/string-18.typ" ( line 17 , column 2 ) (FuncCall (Ident (Identifier "test")) [ NormalArg (FuncCall (FieldAccess (Ident (Identifier "trim")) (Literal (String "123a4b5c678"))) [ NormalArg (FuncCall (Ident (Identifier "regex")) [ NormalArg (Literal (String "\\d")) ]) , KeyValArg (Identifier "repeat") (Literal (Boolean False)) ]) , NormalArg (Literal (String "23a4b5c67")) ]) , SoftBreak , Code "test/typ/compiler/string-18.typ" ( line 18 , column 2 ) (FuncCall (Ident (Identifier "test")) [ NormalArg (FuncCall (FieldAccess (Ident (Identifier "trim")) (Literal (String "123abc456"))) [ NormalArg (FuncCall (Ident (Identifier "regex")) [ NormalArg (Literal (String "\\d")) ]) , KeyValArg (Identifier "at") (Ident (Identifier "start")) ]) , NormalArg (Literal (String "abc456")) ]) , SoftBreak , Code "test/typ/compiler/string-18.typ" ( line 19 , column 2 ) (FuncCall (Ident (Identifier "test")) [ NormalArg (FuncCall (FieldAccess (Ident (Identifier "trim")) (Literal (String "123abc456"))) [ NormalArg (FuncCall (Ident (Identifier "regex")) [ NormalArg (Literal (String "\\d")) ]) , KeyValArg (Identifier "at") (Ident (Identifier "end")) ]) , NormalArg (Literal (String "123abc")) ]) , SoftBreak , Code "test/typ/compiler/string-18.typ" ( line 20 , column 2 ) (FuncCall (Ident (Identifier "test")) [ NormalArg (FuncCall (FieldAccess (Ident (Identifier "trim")) (Literal (String "123abc456"))) [ NormalArg (FuncCall (Ident (Identifier "regex")) [ NormalArg (Literal (String "\\d+")) ]) , KeyValArg (Identifier "at") (Ident (Identifier "end")) , KeyValArg (Identifier "repeat") (Literal (Boolean False)) ]) , NormalArg (Literal (String "123abc")) ]) , SoftBreak , Code "test/typ/compiler/string-18.typ" ( line 21 , column 2 ) (FuncCall (Ident (Identifier "test")) [ NormalArg (FuncCall (FieldAccess (Ident (Identifier "trim")) (Literal (String "123abc456"))) [ NormalArg (FuncCall (Ident (Identifier "regex")) [ NormalArg (Literal (String "\\d{1,2}$")) ]) , KeyValArg (Identifier "repeat") (Literal (Boolean False)) ]) , NormalArg (Literal (String "123abc4")) ]) , SoftBreak , Code "test/typ/compiler/string-18.typ" ( line 22 , column 2 ) (FuncCall (Ident (Identifier "test")) [ NormalArg (FuncCall (FieldAccess (Ident (Identifier "trim")) (Literal (String "hello world"))) [ NormalArg (FuncCall (Ident (Identifier "regex")) [ NormalArg (Literal (String ".")) ]) ]) , NormalArg (Literal (String "")) ]) , ParBreak ] --- evaluated --- document(body: { text(body: [ ]), text(body: [ ]), text(body: [ ]), text(body: [✅]), text(body: [ ]), text(body: [✅]), text(body: [ ]), text(body: [✅]), text(body: [ ]), text(body: [✅]), text(body: [ ]), text(body: [✅]), text(body: [ ]), text(body: [✅]), text(body: [ ]), text(body: [✅]), text(body: [ ]), text(body: [✅]), text(body: [ ]), text(body: [✅]), text(body: [ ]), text(body: [✅]), text(body: [ ]), text(body: [✅]), text(body: [ ]), text(body: [✅]), text(body: [ ]), text(body: [✅]), text(body: [ ]), text(body: [✅]), text(body: [ ]), text(body: [✅]), text(body: [ ]), text(body: [✅]), text(body: [ ]), text(body: [✅]), text(body: [ ]), text(body: [✅]), parbreak() })