Parcourir la source

Added backwards-compatibility property with DeprecationWarning

tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.11.0
MegaIng1 il y a 4 ans
Parent
révision
ee9857cabb
1 fichiers modifiés avec 9 ajouts et 0 suppressions
  1. +9
    -0
      lark/lark.py

+ 9
- 0
lark/lark.py Voir le fichier

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


###}

Chargement…
Annuler
Enregistrer