Skip to content

Commit edb6b28

Browse files
committed
Don't use "if False"...
And tidy code a little.
1 parent 1ebfa4a commit edb6b28

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

mathicsscript/completion.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22

3-
# Copyright (C) 2021-2022, 2024 Rocky Bernstein <[email protected]>
3+
# Copyright (C) 2021-2022, 2024-2025 Rocky Bernstein <[email protected]>
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by
66
# the Free Software Foundation, either version 3 of the License, or
@@ -28,12 +28,12 @@
2828

2929
SYMBOLS = rf"[`]?({Regex.IDENTIFIER}|{Regex.NAMED_CHARACTER})(`({Regex.IDENTIFIER}|{Regex.NAMED_CHARACTER}))+[`]?"
3030

31-
if False: # FIXME reinstate this
32-
NAMED_CHARACTER_START = rf"\\\[{Regex.IDENTIFIER}"
33-
FIND_MATHICS_WORD_RE = re.compile(
34-
rf"({NAMED_CHARACTER_START})|(?:.*[\[\(])?({SYMBOLS}$)"
35-
)
31+
# # The below is a more precise definition for a Mathics3 "word" or
32+
# # "identifier", but it is wrong somehow. NAMED_CHARACTER_START =
33+
# rf"\\\[{Regex.IDENTIFIER}" FIND_MATHICS_WORD_RE = re.compile(
34+
# rf"({NAMED_CHARACTER_START})|(?:.*[\[\(])?({SYMBOLS}$)" )
3635
FIND_MATHICS_WORD_RE = re.compile(r"((?:\[)?[^\s\[\(\{]+)")
36+
3737
CHARGROUP_START = frozenset(["(", "[", "{", ","])
3838

3939

0 commit comments

Comments
 (0)