Browse Source

Tiny fixes. Don't test use_bytes on Python 3.4.

tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.10.0
Erez Sh 4 years ago
parent
commit
b7068c45a7
3 changed files with 5 additions and 2 deletions
  1. +1
    -1
      docs/index.md
  2. +2
    -0
      lark/visitors.py
  3. +2
    -1
      tests/test_parser.py

+ 1
- 1
docs/index.md View File

@@ -32,7 +32,7 @@ $ pip install lark-parser


* [Philosophy & Design Choices](philosophy.md)
* [Full List of Features](features.md)
* [Features](features.md)
* [Examples](https://github.com/lark-parser/lark/tree/master/examples)
* [Online IDE](https://lark-parser.github.io/lark/ide/app.html)
* Tutorials


+ 2
- 0
lark/visitors.py View File

@@ -14,6 +14,8 @@ class Discard(Exception):
# Transformers

class _Decoratable:
"Provides support for decorating methods with @v_args"

@classmethod
def _apply_decorator(cls, decorator, **kwargs):
mro = getmro(cls)


+ 2
- 1
tests/test_parser.py View File

@@ -721,7 +721,8 @@ def _make_parser_test(LEXER, PARSER):
""")
g.parse('\x01\x02\x03')

@unittest.skipIf(sys.version_info[:2]==(2, 7), "bytes parser isn't perfect in Python2.7, exceptions don't work correctly")
@unittest.skipIf(sys.version_info[0]==2 or sys.version_info[:2]==(3, 4),
"bytes parser isn't perfect in Python2, exceptions don't work correctly")
def test_bytes_utf8(self):
g = r"""
start: BOM? char+


Loading…
Cancel
Save