File tree 2 files changed +13
-2
lines changed
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 5
5
from lionwebpython .language .primitive_type import PrimitiveType
6
6
from lionwebpython .lionweb_version import LionWebVersion
7
7
8
+ from pylasu .model import Point , Position
9
+
10
+
8
11
class StarLasuBaseLanguage (Language ):
9
12
if TYPE_CHECKING :
10
13
from lionwebpython .language .concept import Concept
@@ -69,4 +72,12 @@ def get_instance(
69
72
if lion_web_version not in cls ._instances :
70
73
cls ._instances [lion_web_version ] = StarLasuBaseLanguage (lion_web_version )
71
74
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 = [
12
12
]
13
13
description = " Pylasu is an AST Library in the StarLasu family, targeting the Python language."
14
14
readme = " README.md"
15
- requires-python = " >=3.7 "
15
+ requires-python = " >=3.9 "
16
16
classifiers = [
17
17
" Programming Language :: Python :: 3" ,
18
18
" License :: OSI Approved :: Apache Software License" ,
You can’t perform that action at this time.
0 commit comments