summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2018-11-05 13:37:33 +0100
committerLászló Németh <nemeth@numbertext.org>2018-11-05 16:45:55 +0100
commit740b99783b5480fcd1e5fce7c1beb5967d015041 (patch)
treeb98870455126d4b78873558fb730ea6442b3446c /xmloff
parentbec0ad463a39a9d66fc8ab613d0a26f0fa59b00d (diff)
tdf#120413 LibreLogo: handle complex Logo expressions
Instead of the incomplete heuristic parenthesis expansion, now expressions with Logo functions and with own procedures are parsed completely, solving several issues with complex Logo expressions. For example, now functions with more than 1 argument don't need explicit parenthesization. NOTE: to handle both Logo and Python syntaxes of function calls, we differentiate the forms "f(x)" and "f (x)". The second form is handled as Logo syntax, not the Python one: f x*2 y z -> f(x*2, y, z) f(x*2, x, z) -> f(x*2, y, z) f (x*2) y z -> f((x*2), y, z) so if you want to avoid of the following expansion: sin 45 + cos 45 -> sin(45 + cos(45)) it's possible to use the following parenthesizations: sin(45) + cos 45 -> sin(45) + cos(45) (sin 45) + cos 45 -> (sin(45)) + cos(45) but not sin (45) + cos 45 -> sin((45) + cos(45)) Change-Id: Ib0602b47b8b678a352313f471599d44d6904ce17 Reviewed-on: https://gerrit.libreoffice.org/62901 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'xmloff')
0 files changed, 0 insertions, 0 deletions