Commit 1c4d0dfc authored by eckhart's avatar eckhart
Browse files

Typenfehler-Korrekturen

parent d702fc24
......@@ -190,7 +190,7 @@ class Compiler:
"""
elem = node.parser.name or node.parser.ptype[1:]
if not sane_parser_name(elem):
node.add_error("Reserved name '%s' not allowed as parser "
self.tree.new_error(node, "Reserved name '%s' not allowed as parser "
"name! " % elem + "(Any name starting with "
"'_' or '__' or ending with '__' is reserved.)")
return None
......
......@@ -999,7 +999,7 @@ def parse_sxpr(sxpr: str) -> Node:
node.attr.update(attributes)
return node
return inner_parser(sxpr)
return inner_parser(StringView(sxpr))
RX_WHITESPACE_TAIL = re.compile(r'\s*$')
......
......@@ -24,7 +24,7 @@ import os
import sys
from DHParser.compile import compile_source
from DHParser.dsl import compileDSL, compile_on_disk, recompile_grammar
from DHParser.dsl import compileDSL, compile_on_disk # , recompile_grammar
from DHParser.ebnf import get_ebnf_grammar, get_ebnf_transformer, get_ebnf_compiler
from DHParser.log import logging
from DHParser.toolkit import re
......
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