瀏覽代碼

Added backwards-compatibility property with DeprecationWarning

tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.11.0
MegaIng1 4 年之前
父節點
當前提交
ee9857cabb
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. +9
    -0
      lark/lark.py

+ 9
- 0
lark/lark.py 查看文件

@@ -489,5 +489,14 @@ class Lark(Serialize):
def source(self, value):
self.source_path = value

@property
def grammar_source(self):
warn("Lark.grammar_source attribute has been renamed to Lark.source_grammar", DeprecationWarning)
return self.source_grammar
@grammar_source.setter
def grammar_source(self, value):
self.source_grammar = value


###}

Loading…
取消
儲存