jgm / typst-hs

Haskell library for parsing and evaluating typst
Other
44 stars 5 forks source link

Cannot handle `dict.at(variable) = value` expression #25

Closed ntjess closed 10 months ago

ntjess commented 10 months ago
#let x = (a: 5)
#let key = "a"
#{
  x.at(key) = 6
}
#x

This is a valid typst document but pandoc produces the following error:

Cannot update expression FuncCall (FieldAccess (Ident (Identifier "at")) (Ident (Identifier "x"))) [NormalArg (Ident (Identifier "key"))]

Note that pandoc succeeds when directly indexing x with a string, i.e., x.at("a") = 6.