Browse Source

Docs fix + cleanup

tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.12.0
Erez Sh 3 years ago
parent
commit
ec2ba8826e
2 changed files with 1 additions and 12 deletions
  1. +1
    -1
      lark/lexer.py
  2. +0
    -11
      lark/utils.py

+ 1
- 1
lark/lexer.py View File

@@ -120,7 +120,7 @@ class Token(Str):
Attributes:
type: Name of the token (as specified in grammar)
value: Value of the token (redundant, as ``token.value == token`` will always be true)
pos_in_stream: The index of the token in the text
start_pos: The index of the token in the text
line: The line of the token in the text (starting with 1)
column: The column of the token in the text (starting with 1)
end_line: The line where the token ends


+ 0
- 11
lark/utils.py View File

@@ -241,17 +241,6 @@ except ImportError:
pass


try:
compare = cmp
except NameError:
def compare(a, b):
if a == b:
return 0
elif a > b:
return 1
return -1


class Enumerator(Serialize):
def __init__(self):
self.enums = {}


Loading…
Cancel
Save