Sfoglia il codice sorgente

Added backwards-compatibility property with DeprecationWarning

tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.11.0
MegaIng1 4 anni fa
parent
commit
ee9857cabb
1 ha cambiato i file con 9 aggiunte e 0 eliminazioni
  1. +9
    -0
      lark/lark.py

+ 9
- 0
lark/lark.py Vedi File

@@ -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


###}

Caricamento…
Annulla
Salva