File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 55from lionwebpython .language .primitive_type import PrimitiveType
66from lionwebpython .lionweb_version import LionWebVersion
77
8+ from pylasu .model import Point , Position
9+
10+
811class StarLasuBaseLanguage (Language ):
912 if TYPE_CHECKING :
1013 from lionwebpython .language .concept import Concept
@@ -69,4 +72,12 @@ def get_instance(
6972 if lion_web_version not in cls ._instances :
7073 cls ._instances [lion_web_version ] = StarLasuBaseLanguage (lion_web_version )
7174
72- return cls ._instances [lion_web_version ]
75+ return cls ._instances [lion_web_version ]
76+
77+ def position_deserializer (serialized_value , is_required ):
78+ parts = serialized_value .split ("-" )
79+ start_coordinates = parts [0 ].split (":" )
80+ start = Point (int (start_coordinates [0 ][1 :]), int (start_coordinates [1 ]))
81+ end_coordinates = parts [1 ].split (":" )
82+ end = Point (int (end_coordinates [0 ][1 :]), int (end_coordinates [1 ]))
83+ return Position (start , end )
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ authors = [
1212]
1313description = " Pylasu is an AST Library in the StarLasu family, targeting the Python language."
1414readme = " README.md"
15- requires-python = " >=3.7 "
15+ requires-python = " >=3.9 "
1616classifiers = [
1717 " Programming Language :: Python :: 3" ,
1818 " License :: OSI Approved :: Apache Software License" ,
You can’t perform that action at this time.
0 commit comments