瀏覽代碼

Docs fix + cleanup

tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.12.0
Erez Sh 3 年之前
父節點
當前提交
ec2ba8826e
共有 2 個文件被更改,包括 1 次插入12 次删除
  1. +1
    -1
      lark/lexer.py
  2. +0
    -11
      lark/utils.py

+ 1
- 1
lark/lexer.py 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存