summaryrefslogtreecommitdiff
path: root/prolog
diff options
context:
space:
mode:
Diffstat (limited to 'prolog')
-rw-r--r--prolog/util.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/prolog/util.py b/prolog/util.py
index 644080d..e682edb 100644
--- a/prolog/util.py
+++ b/prolog/util.py
@@ -155,17 +155,6 @@ def interesting_ranges(ast, path=()):
if isinstance(subtree, Tree):
yield from interesting_ranges(subtree, path + (ast.label(),))
-# Helper function to remove trailing punctuation from lines and rename
-# variables to A1,A2,A3,… (potentially using [var_names]). Return a tuple.
-def normalized(line, var_names=None):
- # Remove trailing punctuation.
- i = len(line)
- while i > 0:
- if line[i-1].type not in ('COMMA', 'PERIOD', 'SEMI'):
- break
- i -= 1
- return tuple(rename_vars(line[:i], var_names))
-
# Map "formal" variable names in the edit a→b to actual names in code [tokens].
# The set [variables] contains all variable names in the current scope. These
# are used in cases such as [A]→[A,B], where the edit introduces new variables.