summaryrefslogtreecommitdiff
path: root/librelogo
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2019-03-12 23:11:39 +0100
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2019-03-14 16:37:22 +0100
commitd2e3b661d6bc0c24b79abacee50329e4bff3ec88 (patch)
tree2f343893c26c523b8e7332b7def8360169869742 /librelogo
parenta9ca9abf8e8541c741d86ce36db9b2cfa5fd73c3 (diff)
tdf#124035 LibreLogo: support starting colon in variable names
Regression from the commit 740b99783b5480fcd1e5fce7c1beb5967d015041 "tdf#120413 LibreLogo: handle complex Logo expressions". Change-Id: Iaae54efacf86a03a6611c154a40068ed058d43e7 Reviewed-on: https://gerrit.libreoffice.org/69138 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 8547a8d90af69104f4eb27137d39678b45d6d9d1) Reviewed-on: https://gerrit.libreoffice.org/69152 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'librelogo')
-rw-r--r--librelogo/source/LibreLogo/LibreLogo.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/librelogo/source/LibreLogo/LibreLogo.py b/librelogo/source/LibreLogo/LibreLogo.py
index 6dde2f3c237a..d4fa0cfea340 100644
--- a/librelogo/source/LibreLogo/LibreLogo.py
+++ b/librelogo/source/LibreLogo/LibreLogo.py
@@ -1903,7 +1903,7 @@ def __compil__(s):
# compile to Python
subroutines = re.compile(r"(?iu)(?<!def )(?<![_\w])\b(%s)\b(?![\w(])" % "|".join(subnames + functions + defaultfunc))
operators = re.compile(r"(?iu)(%s)" % "(?:[ ]*([+*/<>]|//|==|<=|>=|<>|!=)[ ]*|[ ]*-[ ]+|(?<! )-[ ]*|[ ]*[*][*][ ]*)") # operators, eg. " - ", "-", "- "
- atoms = re.compile(r"(?iu)(%s)" % "[0-9]+([.,][0-9]+)?|\w+([.]\w)?")
+ atoms = re.compile(r"(?iu)(%s)" % "[0-9]+([.,][0-9]+)?|:?\w+([.]\w)?")
# store argument numbers of all subroutines in dictionary "names"
names = {key: 1 for key in functions + defaultfunc}