2.12.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 54275a30 authored by di68kap's avatar di68kap
Browse files

Merge remote-tracking branch 'origin/development' into development

parents 017c4fd7 e4658808
......@@ -1630,7 +1630,7 @@ def mandatory_violation(grammar: Grammar,
needed by the AllOf- as well as the Series-parser.
:param grammar: the grammar
:param text_: the point, where the mandatory vialoation. As usual the
:param text_: the point, where the mandatory violation. As usual the
string view represents the remaining text from this point.
:param failed_on_lookahead: True if the violating parser was a
Lookahead-Parser.
......@@ -1650,7 +1650,7 @@ def mandatory_violation(grammar: Grammar,
i = reloc if reloc >= 0 else 0
location = grammar.document_length__ - len(text_)
err_node = Node(ZOMBIE_TAG, text_[:i]).with_pos(location)
found = text_[:10].replace('\n', '\\n ')
found = text_[:10].replace('\n', '\\n ') + '...'
for search, message in err_msgs:
rxs = not isinstance(search, str)
if rxs and text_.match(search) or (not rxs and text_.startswith(search)):
......
......@@ -47,8 +47,8 @@ from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor
import json
from multiprocessing import Process, Value, Queue
import sys
from typing import Callable, Optional, Union, Dict, List, Tuple, NamedTuple, Sequence, Set, cast
from urllib.parse import urlparse
from typing import Callable, Optional, Union, Dict, List, Tuple, Sequence, Set, cast
from urllib.parse import urlparse, parse_qs
from DHParser.toolkit import get_config_value, is_filename, load_if_file, re
......@@ -178,8 +178,8 @@ class Server:
pass
else:
head = str(data[:4096])
if is_filename(head) or RX_IS_JSON.match(head):
# TODO: compile file
if not RX_IS_JSON.match(head):
# TODO: compile file or data
pass
if rpc_error is None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment