put the last regex in the syntax file

This commit is contained in:
vicky 2022-05-11 00:27:43 +02:00
parent c21d034217
commit 68d8af9fd2
1 changed files with 5 additions and 0 deletions

View File

@ -4,6 +4,7 @@ from itertools import zip_longest
import pyparsing as pp
# import rich
import regex # future: remove regex
pps = pp.Suppress
@ -237,6 +238,10 @@ def readable_markup(list_of_tokens):
return " ".join(readable_list)
# Pre-parser expressions
rgx_import_file = regex.compile(r'::( ?\< ?(?P<file_name>[\w\-._/]+) ?\>[ \s]*)+')
# Base elements
quotes = pp.Word(r""""'""")
value = (pps(quotes) + pp.Word(pp.alphanums + r'.') + pps(pp.match_previous_literal(quotes)) ^