feat: Allow expressions to be terminated/sequenced by ;

Note that ultimately a terminated sequence may have
   a slightly different semantics (applying streams
   to `_|_`, most likely) but for now they don't.
This commit is contained in:
Glen Whitney 2021-02-10 12:47:34 -08:00
parent 991976d3a8
commit b9c8532899
10 changed files with 156 additions and 65 deletions

View file

@ -23,8 +23,10 @@ for path in TEST_LIST:
tests = re.split(r'test\s*(.+?)\s*\[\[.*?\n', contents)[1:]
testit = iter(tests)
for name, details in zip(testit, testit):
pfm = re.search(r'\n\s*\]\].*?parse\s*fails', details)
if pfm: continue # skip examples that don't parse
pfm = re.search(r'\n\s*\]\][\s\S]*?parse\s*fails', details)
if pfm: continue # skip examples that don't parse
ntfm = re.search(r'\n\s*\]\].*?don.t.test', details)
if ntfm: continue # explicit skip
em = re.search(r'\n\s*\]\]', details)
if not em: continue
example = details[:em.start()+1]