From 025254ce93f7ce8b4d175dcb85d228506202583c Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Wed, 18 May 2016 12:23:56 +0200 Subject: Prolog: remove language hint about lowercase vars These hints are not appropriate for DCG exercises. --- prolog/common.py | 9 --------- 1 file changed, 9 deletions(-) (limited to 'prolog') 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 -- cgit v1.2.1