summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-05-18 12:23:56 +0200
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-05-18 12:23:56 +0200
commit025254ce93f7ce8b4d175dcb85d228506202583c (patch)
treeb2435055c0a37ed74cf11ef60a0e4e7e4fc850f8
parent77aa621b0ddcfaa2f83a2ec75117480db9dee6db (diff)
Prolog: remove language hint about lowercase vars
These hints are not appropriate for DCG exercises.
-rw-r--r--prolog/common.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/prolog/common.py b/prolog/common.py
index 1d224b5..8e3d91d 100644
--- a/prolog/common.py
+++ b/prolog/common.py
@@ -46,13 +46,4 @@ def hint(code, aux_code):
if t.val == ':-' and t1.val in ('fail', 'false') and t2.val == '.':
hints += [{'id': 'fail_rule', 'start': t.pos, 'end': t2.pos + len(t2.val)}]
- # a,b,c are a bit dangerous when crossing the river exercise is being solved
- # what about potential numbers after letters?
- # TODO this will have to be solved more generally
- targets = {'a', 'c', 'x', 'y', 'z', 'h', 'l', 's', 'v', 'w'}
- marks = [(t.pos, t.pos + len(t.val)) for t in tokens if t.type == 'NAME' and t.val in targets]
- if marks:
- hints += [{'id': 'noncapitalised_variable_markup', 'start': m[0], 'end': m[1]} for m in marks] + \
- [{'id': 'noncapitalised_variable'}]
-
return hints