jaclang 0.7.23__py3-none-any.whl → 0.7.24__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of jaclang might be problematic. Click here for more details.

@@ -1261,6 +1261,9 @@ class Enum(ArchSpec, AstAccessNode, AstImplNeedingNode, ArchBlockStmt):
1261
1261
  res = res and self.semstr.normalize(deep) if self.semstr else res
1262
1262
  res = res and self.decorators.normalize(deep) if self.decorators else res
1263
1263
  new_kid: list[AstNode] = []
1264
+ if self.decorators:
1265
+ new_kid.append(self.gen_token(Tok.DECOR_OP))
1266
+ new_kid.append(self.decorators)
1264
1267
  if self.doc:
1265
1268
  new_kid.append(self.doc)
1266
1269
  new_kid.append(self.gen_token(Tok.KW_ENUM))
@@ -4278,10 +4281,9 @@ class String(Literal):
4278
4281
  elif self.value.startswith(("'", '"')):
4279
4282
  repr_str = self.value.encode().decode("unicode_escape")
4280
4283
  if (
4281
- self.value.startswith('"""')
4282
- and self.value.endswith('"""')
4283
- and not self.find_parent_of_type(FString)
4284
- ):
4284
+ (self.value.startswith('"""') and self.value.endswith('"""'))
4285
+ or (self.value.startswith("'''") and self.value.endswith("'''"))
4286
+ ) and not self.find_parent_of_type(FString):
4285
4287
  return repr_str[3:-3]
4286
4288
  if (not self.find_parent_of_type(FString)) or (
4287
4289
  not (
@@ -706,10 +706,12 @@ class JacParser(Pass):
706
706
  | NAME (COLON STRING)?
707
707
  | py_code_block
708
708
  | free_code
709
+ | abstract_ability
710
+ | ability
709
711
  """
710
- if isinstance(kid[0], ast.PyInlineCode):
712
+ if isinstance(kid[0], (ast.PyInlineCode, ast.Ability)):
711
713
  return self.nu(kid[0])
712
- if isinstance(kid[0], (ast.Name)):
714
+ elif isinstance(kid[0], (ast.Name)):
713
715
  if (
714
716
  len(kid) >= 3
715
717
  and isinstance(kid[-1], ast.Expr)
@@ -42,6 +42,8 @@ with entry {
42
42
  len(f_s1), len(f_s2)
43
43
  ) ;
44
44
  """sdfsdf\nsdfsdfsdfsd dffgdfgd.""" ;
45
+ c1 = '''hello klkl"""''';
46
+ print(c1) ;
45
47
  }
46
48
  can func() {;
47
49
  }
jaclang/plugin/default.py CHANGED
@@ -510,9 +510,10 @@ class JacBuiltinImpl:
510
510
  'fillcolor="invis", fontcolor="black"];\n'
511
511
  )
512
512
  for source, target, edge in connections:
513
+ edge_label = html.escape(str(edge.__jac__.architype))
513
514
  dot_content += (
514
515
  f"{visited_nodes.index(source)} -> {visited_nodes.index(target)} "
515
- f' [label="{html.escape(str(edge.__jac__.architype))} "];\n'
516
+ f' [label="{edge_label if "GenericEdge" not in edge_label else ""}"];\n'
516
517
  )
517
518
  for node_ in visited_nodes:
518
519
  color = (
@@ -854,8 +855,13 @@ class JacFeatureImpl(
854
855
 
855
856
  @staticmethod
856
857
  @hookimpl
857
- def report(expr: Any) -> Any: # noqa: ANN401
858
+ def report(expr: Any, custom: bool) -> None: # noqa: ANN401
858
859
  """Jac's report stmt feature."""
860
+ ctx = Jac.get_context()
861
+ if custom:
862
+ ctx.custom = expr
863
+ else:
864
+ ctx.reports.append(expr)
859
865
 
860
866
  @staticmethod
861
867
  @hookimpl
jaclang/plugin/feature.py CHANGED
@@ -371,9 +371,9 @@ class JacFeature(
371
371
  return plugin_manager.hook.has_instance_default(gen_func=gen_func)
372
372
 
373
373
  @staticmethod
374
- def report(expr: Any) -> Any: # noqa: ANN401
374
+ def report(expr: Any, custom: bool = False) -> None: # noqa: ANN401
375
375
  """Jac's report stmt feature."""
376
- return plugin_manager.hook.report(expr=expr)
376
+ plugin_manager.hook.report(expr=expr, custom=custom)
377
377
 
378
378
  @staticmethod
379
379
  def edge_ref(
@@ -0,0 +1,471 @@
1
+ # **Override Plugin Implementations**
2
+
3
+
4
+ ## AccessValidation Related Methods
5
+ ### **`allow_root`**
6
+ ```python
7
+ def allow_root(
8
+ architype: Architype,
9
+ root_id: UUID,
10
+ level: AccessLevel | int | str
11
+ ) -> None:
12
+ """Allow all access from target root graph to current Architype."""
13
+ ```
14
+ ### **`disallow_root`**
15
+ ```python
16
+ def disallow_root(
17
+ architype: Architype,
18
+ root_id: UUID,
19
+ level: AccessLevel | int | str
20
+ ) -> None:
21
+ """Disallow all access from target root graph to current Architype."""
22
+ ```
23
+ ### **`unrestrict`**
24
+ ```python
25
+ def unrestrict(
26
+ architype: Architype,
27
+ level: AccessLevel | int | str
28
+ ) -> None:
29
+ """Allow everyone to access current Architype."""
30
+ ```
31
+ ### **`restrict`**
32
+ ```python
33
+ def restrict(
34
+ architype: Architype
35
+ ) -> None:
36
+ """Disallow others to access current Architype."""
37
+ ```
38
+ ### **`check_read_access`**
39
+ ```python
40
+ def check_read_access(
41
+ to: Anchor
42
+ ) -> bool:
43
+ """Read Access Validation."""
44
+ ```
45
+ ### **`check_connect_access`**
46
+ ```python
47
+ def check_connect_access(
48
+ to: Anchor
49
+ ) -> bool:
50
+ """Connect Access Validation."""
51
+ ```
52
+ ### **`check_write_access`**
53
+ ```python
54
+ def check_write_access(
55
+ to: Anchor
56
+ ) -> bool:
57
+ """Write Access Validation."""
58
+ ```
59
+ ### **`check_access_level`**
60
+ ```python
61
+ def check_access_level(
62
+ to: Anchor
63
+ ) -> AccessLevel:
64
+ """Access validation."""
65
+ ```
66
+
67
+
68
+ ## Node Related Methods
69
+ ### **`node_dot`**
70
+ ```python
71
+ def node_dot(
72
+ node: NodeArchitype,
73
+ dot_file: Optional[str]
74
+ ) -> str:
75
+ """Generate Dot file for visualizing nodes and edges."""
76
+ ```
77
+ ### **`get_edges`**
78
+ ```python
79
+ def get_edges(
80
+ node: NodeAnchor,
81
+ dir: EdgeDir,
82
+ filter_func: Optional[Callable[[list[EdgeArchitype]], list[EdgeArchitype]]],
83
+ target_obj: Optional[list[NodeArchitype]],
84
+ ) -> list[EdgeArchitype]:
85
+ """Get edges connected to this node."""
86
+ ```
87
+ ### **`edges_to_nodes`**
88
+ ```python
89
+ def edges_to_nodes(
90
+ node: NodeAnchor,
91
+ dir: EdgeDir,
92
+ filter_func: Optional[Callable[[list[EdgeArchitype]], list[EdgeArchitype]]],
93
+ target_obj: Optional[list[NodeArchitype]],
94
+ ) -> list[NodeArchitype]:
95
+ """Get set of nodes connected to this node."""
96
+ ```
97
+ ### **`remove_edge`**
98
+ ```python
99
+ def remove_edge(
100
+ node: NodeAnchor,
101
+ edge: EdgeAnchor
102
+ ) -> None:
103
+ """Remove reference without checking sync status."""
104
+ ```
105
+
106
+
107
+ ## Edge Related Methods
108
+ ### **`detach`**
109
+ ```python
110
+ def detach(
111
+ edge: EdgeAnchor
112
+ ) -> None:
113
+ """Detach edge from nodes."""
114
+ ```
115
+
116
+
117
+ ## Walker Related Methods
118
+ ### **`visit_node`**
119
+ ```python
120
+ def visit_node(
121
+ walker: WalkerArchitype,
122
+ expr: (
123
+ list[NodeArchitype | EdgeArchitype]
124
+ | list[NodeArchitype]
125
+ | list[EdgeArchitype]
126
+ | NodeArchitype
127
+ | EdgeArchitype
128
+ ),
129
+ ) -> bool:
130
+ """Include target node/edge to current walker's visit queue."""
131
+ ```
132
+ ### **`ignore`**
133
+ ```python
134
+ def ignore(
135
+ walker: WalkerArchitype,
136
+ expr: (
137
+ list[NodeArchitype | EdgeArchitype]
138
+ | list[NodeArchitype]
139
+ | list[EdgeArchitype]
140
+ | NodeArchitype
141
+ | EdgeArchitype
142
+ ),
143
+ ) -> bool:
144
+ """Include target node/edge to current walker's ignored architype."""
145
+ ```
146
+ ### **`spawn_call`**
147
+ ```python
148
+ def spawn_call(
149
+ op1: Architype,
150
+ op2: Architype
151
+ ) -> WalkerArchitype:
152
+ """Invoke data spatial call."""
153
+ ```
154
+ ### **`disengage`**
155
+ ```python
156
+ def disengage(
157
+ walker: WalkerArchitype
158
+ ) -> bool:
159
+ """Disengaged current walker."""
160
+ ```
161
+
162
+
163
+ ## Builtin Related Methods
164
+ ### **`dotgen`**
165
+ ```python
166
+ def dotgen(
167
+ node: NodeArchitype,
168
+ depth: int,
169
+ traverse: bool,
170
+ edge_type: Optional[list[str]],
171
+ bfs: bool,
172
+ edge_limit: int,
173
+ node_limit: int,
174
+ dot_file: Optional[str],
175
+ ) -> str:
176
+ """Print the dot graph."""
177
+ ```
178
+
179
+
180
+ ## Cmd Related Methods
181
+ ### **`create_cmd`**
182
+ ```python
183
+ def create_cmd(
184
+ ) -> None:
185
+ """Create Jac CLI cmds."""
186
+ ```
187
+
188
+
189
+ ## Feature Related Methods
190
+ ### **`setup`**
191
+ ```python
192
+ def setup(
193
+ ) -> None:
194
+ """Set Class References to Jac."""
195
+ ```
196
+ ### **`get_context`**
197
+ ```python
198
+ def get_context(
199
+ ) -> ExecutionContext:
200
+ """Get current execution context."""
201
+ ```
202
+ ### **`get_object`**
203
+ ```python
204
+ def get_object(
205
+ id: str
206
+ ) -> Architype | None:
207
+ """Get object by id."""
208
+ ```
209
+ ### **`object_ref`**
210
+ ```python
211
+ def object_ref(
212
+ obj: Architype
213
+ ) -> str:
214
+ """Get object's id."""
215
+ ```
216
+ ### **`make_architype`**
217
+ ```python
218
+ def make_architype(
219
+ cls: type,
220
+ arch_base: Type[Architype],
221
+ on_entry: list[DSFunc],
222
+ on_exit: list[DSFunc],
223
+ ) -> Type[Architype]:
224
+ """Create a obj architype."""
225
+ ```
226
+ ### **`make_obj`**
227
+ ```python
228
+ def make_obj(
229
+ on_entry: list[DSFunc],
230
+ on_exit: list[DSFunc]
231
+ ) -> Callable[[type], type]:
232
+ """Create a obj architype."""
233
+ ```
234
+ ### **`make_node`**
235
+ ```python
236
+ def make_node(
237
+ on_entry: list[DSFunc],
238
+ on_exit: list[DSFunc]
239
+ ) -> Callable[[type], type]:
240
+ """Create a node architype."""
241
+ ```
242
+ ### **`make_edge`**
243
+ ```python
244
+ def make_edge(
245
+ on_entry: list[DSFunc],
246
+ on_exit: list[DSFunc]
247
+ ) -> Callable[[type], type]:
248
+ """Create a edge architype."""
249
+ ```
250
+ ### **`make_walker`**
251
+ ```python
252
+ def make_walker(
253
+ on_entry: list[DSFunc],
254
+ on_exit: list[DSFunc]
255
+ ) -> Callable[[type], type]:
256
+ """Create a walker architype."""
257
+ ```
258
+ ### **`impl_patch_filename`**
259
+ ```python
260
+ def impl_patch_filename(
261
+ file_loc: str,
262
+ ) -> Callable[[Callable[P, T]], Callable[P, T]]:
263
+ """Update impl file location."""
264
+ ```
265
+ ### **`jac_import`**
266
+ ```python
267
+ def jac_import(
268
+ target: str,
269
+ base_path: str,
270
+ absorb: bool,
271
+ cachable: bool,
272
+ mdl_alias: Optional[str],
273
+ override_name: Optional[str],
274
+ lng: Optional[str],
275
+ items: Optional[dict[str, Union[str, Optional[str]]]],
276
+ reload_module: Optional[bool],
277
+ ) -> tuple[types.ModuleType, ...]:
278
+ """Core Import Process."""
279
+ ```
280
+ ### **`create_test`**
281
+ ```python
282
+ def create_test(
283
+ test_fun: Callable
284
+ ) -> Callable:
285
+ """Create a new test."""
286
+ ```
287
+ ### **`run_test`**
288
+ ```python
289
+ def run_test(
290
+ filepath: str,
291
+ filter: Optional[str],
292
+ xit: bool,
293
+ maxfail: Optional[int],
294
+ directory: Optional[str],
295
+ verbose: bool,
296
+ ) -> int:
297
+ """Run the test suite in the specified .jac file."""
298
+ ```
299
+ ### **`elvis`**
300
+ ```python
301
+ def elvis(
302
+ op1: Optional[T],
303
+ op2: T
304
+ ) -> T:
305
+ """Jac's elvis operator feature."""
306
+ ```
307
+ ### **`has_instance_default`**
308
+ ```python
309
+ def has_instance_default(
310
+ gen_func: Callable[[], T]
311
+ ) -> T:
312
+ """Jac's has container default feature."""
313
+ ```
314
+ ### **`report`**
315
+ ```python
316
+ def report(
317
+ expr: Any
318
+ ) -> Any:
319
+ """Jac's report stmt feature."""
320
+ ```
321
+ ### **`edge_ref`**
322
+ ```python
323
+ def edge_ref(
324
+ node_obj: NodeArchitype | list[NodeArchitype],
325
+ target_obj: Optional[NodeArchitype | list[NodeArchitype]],
326
+ dir: EdgeDir,
327
+ filter_func: Optional[Callable[[list[EdgeArchitype]], list[EdgeArchitype]]],
328
+ edges_only: bool,
329
+ ) -> list[NodeArchitype] | list[EdgeArchitype]:
330
+ """Jac's apply_dir stmt feature."""
331
+ ```
332
+ ### **`connect`**
333
+ ```python
334
+ def connect(
335
+ left: NodeArchitype | list[NodeArchitype],
336
+ right: NodeArchitype | list[NodeArchitype],
337
+ edge_spec: Callable[[NodeAnchor, NodeAnchor], EdgeArchitype],
338
+ edges_only: bool,
339
+ ) -> list[NodeArchitype] | list[EdgeArchitype]:
340
+ """Jac's connect operator feature.
341
+
342
+ Note: connect needs to call assign compr with tuple in op
343
+ """
344
+ ```
345
+ ### **`disconnect`**
346
+ ```python
347
+ def disconnect(
348
+ left: NodeArchitype | list[NodeArchitype],
349
+ right: NodeArchitype | list[NodeArchitype],
350
+ dir: EdgeDir,
351
+ filter_func: Optional[Callable[[list[EdgeArchitype]], list[EdgeArchitype]]],
352
+ ) -> bool:
353
+ """Jac's disconnect operator feature."""
354
+ ```
355
+ ### **`assign_compr`**
356
+ ```python
357
+ def assign_compr(
358
+ target: list[T],
359
+ attr_val: tuple[tuple[str], tuple[Any]]
360
+ ) -> list[T]:
361
+ """Jac's assign comprehension feature."""
362
+ ```
363
+ ### **`get_root`**
364
+ ```python
365
+ def get_root(
366
+ ) -> Root:
367
+ """Get current root."""
368
+ ```
369
+ ### **`get_root_type`**
370
+ ```python
371
+ def get_root_type(
372
+ ) -> Type[Root]:
373
+ """Get root type."""
374
+ ```
375
+ ### **`build_edge`**
376
+ ```python
377
+ def build_edge(
378
+ is_undirected: bool,
379
+ conn_type: Optional[Type[EdgeArchitype] | EdgeArchitype],
380
+ conn_assign: Optional[tuple[tuple, tuple]],
381
+ ) -> Callable[[NodeAnchor, NodeAnchor], EdgeArchitype]:
382
+ """Build edge operator."""
383
+ ```
384
+ ### **`save`**
385
+ ```python
386
+ def save(
387
+ obj: Architype | Anchor,
388
+ ) -> None:
389
+ """Save object."""
390
+ ```
391
+ ### **`destroy`**
392
+ ```python
393
+ def destroy(
394
+ obj: Architype | Anchor,
395
+ ) -> None:
396
+ """Destroy object."""
397
+ ```
398
+ ### **`get_semstr_type`**
399
+ ```python
400
+ def get_semstr_type(
401
+ file_loc: str,
402
+ scope: str,
403
+ attr: str,
404
+ return_semstr: bool
405
+ ) -> Optional[str]:
406
+ """Jac's get_semstr_type stmt feature."""
407
+ ```
408
+ ### **`obj_scope`**
409
+ ```python
410
+ def obj_scope(
411
+ file_loc: str,
412
+ attr: str
413
+ ) -> str:
414
+ """Jac's get_semstr_type feature."""
415
+ ```
416
+ ### **`get_sem_type`**
417
+ ```python
418
+ def get_sem_type(
419
+ file_loc: str,
420
+ attr: str
421
+ ) -> tuple[str | None, str | None]:
422
+ """Jac's get_semstr_type feature."""
423
+ ```
424
+ ### **`with_llm`**
425
+ ```python
426
+ def with_llm(
427
+ file_loc: str,
428
+ model: Any,
429
+ model_params: dict[str, Any],
430
+ scope: str,
431
+ incl_info: list[tuple[str, str]],
432
+ excl_info: list[tuple[str, str]],
433
+ inputs: list[tuple[str, str, str, Any]],
434
+ outputs: tuple,
435
+ action: str,
436
+ _globals: dict,
437
+ _locals: Mapping,
438
+ ) -> Any:
439
+ """Jac's with_llm stmt feature."""
440
+ ```
441
+ ### **`gen_llm_body`**
442
+ ```python
443
+ def gen_llm_body(
444
+ _pass: PyastGenPass,
445
+ node: ast.Ability
446
+ ) -> list[ast3.AST]:
447
+ """Generate the by LLM body."""
448
+ ```
449
+ ### **`by_llm_call`**
450
+ ```python
451
+ def by_llm_call(
452
+ _pass: PyastGenPass,
453
+ model: ast3.AST,
454
+ model_params: dict[str, ast.Expr],
455
+ scope: ast3.AST,
456
+ inputs: Sequence[Optional[ast3.AST]],
457
+ outputs: Sequence[Optional[ast3.AST]] | ast3.Call,
458
+ action: Optional[ast3.AST],
459
+ include_info: list[tuple[str, ast3.AST]],
460
+ exclude_info: list[tuple[str, ast3.AST]],
461
+ ) -> ast3.Call:
462
+ """Return the LLM Call, e.g. _Jac.with_llm()."""
463
+ ```
464
+ ### **`get_by_llm_call_args`**
465
+ ```python
466
+ def get_by_llm_call_args(
467
+ _pass: PyastGenPass,
468
+ node: ast.FuncCall
469
+ ) -> dict:
470
+ """Get the by LLM call args."""
471
+ ```
jaclang/plugin/spec.py CHANGED
@@ -356,7 +356,7 @@ class JacFeatureSpec(
356
356
 
357
357
  @staticmethod
358
358
  @hookspec(firstresult=True)
359
- def report(expr: Any) -> Any: # noqa: ANN401
359
+ def report(expr: Any, custom: bool) -> None: # noqa: ANN401
360
360
  """Jac's report stmt feature."""
361
361
  raise NotImplementedError
362
362
 
@@ -458,6 +458,7 @@ class JacFeatureSpec(
458
458
  raise NotImplementedError
459
459
 
460
460
  @staticmethod
461
+ @hookspec(firstresult=True)
461
462
  def get_sem_type(file_loc: str, attr: str) -> tuple[str | None, str | None]:
462
463
  """Jac's get_semstr_type feature."""
463
464
  raise NotImplementedError
@@ -4,6 +4,7 @@ from __future__ import annotations
4
4
 
5
5
  import unittest
6
6
  from contextvars import ContextVar
7
+ from dataclasses import MISSING
7
8
  from typing import Any, Callable, Optional, cast
8
9
  from uuid import UUID
9
10
 
@@ -26,6 +27,7 @@ class ExecutionContext:
26
27
 
27
28
  mem: Memory
28
29
  reports: list[Any]
30
+ custom: Any = MISSING
29
31
  system_root: NodeAnchor
30
32
  root: NodeAnchor
31
33
  entry_node: NodeAnchor
jaclang/settings.py CHANGED
@@ -58,6 +58,9 @@ class Settings:
58
58
  """Override settings from environment variables if available."""
59
59
  for key in [f.name for f in fields(self)]:
60
60
  env_value = os.getenv("JACLANG_" + key.upper())
61
+ env_value = (
62
+ env_value if env_value is not None else os.getenv("JAC_" + key.upper())
63
+ )
61
64
  if env_value is not None:
62
65
  setattr(self, key, self.convert_type(env_value))
63
66
 
@@ -27,11 +27,11 @@ with entry{
27
27
  d3=dotgen(b[2],edge_limit=5,depth=5);l3=d3|>len; #generate dot for all connected with b[1] node
28
28
  d4=dotgen(b[1],bfs=True,edge_type= ["Edge1"],node_limit=100,edge_limit=900,depth=300);l4=d4|>len; #generate dot from nodes with depth 3 connected with b[1] node
29
29
  d5=dotgen(b[1],node_limit=10,edge_limit=90);l5:=d5|>len; #generate dot from nodes with depth 3 connected with b[1] node
30
- print(d1.count('a(val')==12,d1.count('#FFFFE0')==3,'Root' in d1,d1.count('GenericEdge')==30);
31
- print(d2.count('a(val')==19,d2.count('#F5E5FF')==2 ,'Edge1' not in d2,d2.count('GenericEdge')==42);
32
- print(d3.count('a(val')==6,d3.count("GenericEdge")==5,d3.count('#F5E5FF')==1);
33
- print(d4.count("a(val")==25,d4.count("GenericEdge")==66,d4.count('#FFF0F')==3);
34
- print(d5.count("Edge1(val=6)")==2, d5.count("GenericEdge()")==24);
30
+ print(d1.count('a(val')==12,d1.count('#FFFFE0')==3,'Root' in d1,d1.count('label=""')==30);
31
+ print(d2.count('a(val')==19,d2.count('#F5E5FF')==2 ,'Edge1' not in d2,d2.count('label=""')==42);
32
+ print(d3.count('a(val')==6,d3.count('label=""')==5,d3.count('#F5E5FF')==1);
33
+ print(d4.count("a(val")==25,d4.count('label=""')==66,d4.count('#FFF0F')==3);
34
+ print(d5.count("Edge1(val=6)")==2, d5.count('label=""')==24);
35
35
  # print(l3<l2);
36
36
  # print(d1);
37
37
  # print(d2);
@@ -39,4 +39,4 @@ with entry{
39
39
  # print(d4);
40
40
  # print(dotgen(node=b[2],bfs=True,depth=3.96,edge_limit=12,node_limit=12.96));
41
41
 
42
- }
42
+ }
@@ -1,20 +1,25 @@
1
- obj outer{
2
- has o1:int=9;
1
+ obj outer {
2
+ has o1: int = 9;
3
3
 
4
- obj inner{
5
- has i1:int=8;
4
+ obj inner {
5
+ has i1: int = 8;
6
6
  }
7
- can foo(){
7
+ can foo() {
8
8
  return 'foo';
9
9
  }
10
- enum color{
10
+ enum color {
11
11
  red,
12
12
  green,
13
- blue
13
+ blue,
14
+ with entry {
15
+ print('Initializing role system..');
16
+ },
17
+ can foo -> str {
18
+ return 'Accessing privileged Data';
14
19
  }
15
-
20
+ }
16
21
  }
17
22
 
18
- with entry{
19
- print(outer.color.green.value);
20
- }
23
+ with entry {
24
+ print(outer.color.green.value, outer.color.foo());
25
+ }
@@ -237,6 +237,7 @@ class JacLanguageTests(TestCase):
237
237
  self.assertEqual(stdout_value.split("\n")[0], "11 13 12 12 11 12 12")
238
238
  self.assertEqual(stdout_value.split("\n")[1], '12 12 """hello""" 18 18')
239
239
  self.assertEqual(stdout_value.split("\n")[2], "11 12 11 12 11 18 23")
240
+ self.assertEqual(stdout_value.split("\n")[3], 'hello klkl"""')
240
241
 
241
242
  def test_deep_imports(self) -> None:
242
243
  """Parse micro jac file."""
@@ -491,7 +492,7 @@ class JacLanguageTests(TestCase):
491
492
  jac_import("enum_inside_archtype", base_path=self.fixture_abs_path("./"))
492
493
  sys.stdout = sys.__stdout__
493
494
  stdout_value = captured_output.getvalue()
494
- self.assertEqual("2\n", stdout_value)
495
+ self.assertIn("2 Accessing privileged Data", stdout_value)
495
496
 
496
497
  def test_needs_import_1(self) -> None:
497
498
  """Test py ast to Jac ast conversion output."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: jaclang
3
- Version: 0.7.23
3
+ Version: 0.7.24
4
4
  Summary: Jac is a unique and powerful programming language that runs on top of Python, offering an unprecedented level of intelligence and intuitive understanding.
5
5
  Home-page: https://jaseci.org
6
6
  License: MIT
@@ -14,6 +14,7 @@ Classifier: License :: OSI Approved :: MIT License
14
14
  Classifier: Programming Language :: Python :: 3
15
15
  Classifier: Programming Language :: Python :: 3.11
16
16
  Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
17
18
  Provides-Extra: all
18
19
  Provides-Extra: llm
19
20
  Provides-Extra: streamlit
@@ -6,12 +6,12 @@ jaclang/cli/cli.py,sha256=42ebFJyoIIUl8Jn9CHSfm9CgM6meHYDddgk3gGoY-dQ,15969
6
6
  jaclang/cli/cmdreg.py,sha256=5mhzLJnpHfc0Z22qKQgcEOICgBaC95G9gSJZ-R7GqvU,8282
7
7
  jaclang/compiler/.gitignore,sha256=n1k2_xXTorp9PY8hhYM4psHircn-NMaFx95bSgDKopo,10
8
8
  jaclang/compiler/__init__.py,sha256=O1GO5Hb02vRlz7OpYHinQV5lQ7YuNUV9Hgjlc3QWtZg,2780
9
- jaclang/compiler/absyntree.py,sha256=cBF837cKo7lUDzBX_dvzCf0pCOcq4eNsHgseIjgEvXk,139002
9
+ jaclang/compiler/absyntree.py,sha256=kFXn__PKD3uuXmgWgHb-iyjKJ3zVlOqouqxRklVVKz0,139182
10
10
  jaclang/compiler/codeloc.py,sha256=YhJcHjhMCOT6mV1qLehwriuFgW0H2-ntq68k_r8yBs4,2800
11
11
  jaclang/compiler/compile.py,sha256=0d8p4i2LXg2RCu1XfWx_Jq_dx7pK2Zn2VIj-apvX_nI,3389
12
12
  jaclang/compiler/constant.py,sha256=gKccXK4Qf3CWuv8J1oaWrwqdP7CRIf7ndayquRx6Xgs,9007
13
13
  jaclang/compiler/jac.lark,sha256=NmoNb_hE4xKgVEo9aFreE9RdGOIvCBq-NU0Qs5Js6VE,17393
14
- jaclang/compiler/parser.py,sha256=QAiHcqBACxrg4t0jpoRDGYJssPWRC7P9eCYsIaBDMGE,142479
14
+ jaclang/compiler/parser.py,sha256=5plH4yEEla89sHKqd5F6bCVZCh3e4gH9o-ovnX0V69s,142565
15
15
  jaclang/compiler/passes/__init__.py,sha256=0Tw0d130ZjzA05jVcny9cf5NfLjlaM70PKqFnY4zqn4,69
16
16
  jaclang/compiler/passes/ir_pass.py,sha256=8F9YL6dUUm6gP2ZkjIuaYgX7GHwyck5MEB7LYJdAhQc,5607
17
17
  jaclang/compiler/passes/main/__init__.py,sha256=DLbOP_7q8jJ9-ME_8A0d_FVk2crh9etTmTGQmtKWLnY,973
@@ -42,7 +42,7 @@ jaclang/compiler/passes/main/tests/fixtures/blip.jac,sha256=Fx9zqQ8VkiQ6vgzbQv9L
42
42
  jaclang/compiler/passes/main/tests/fixtures/codegentext.jac,sha256=U9xyk8hDlWM3jUaozQXOD61f5p9SI-_QfDxA68DUYds,562
43
43
  jaclang/compiler/passes/main/tests/fixtures/decls.jac,sha256=vPHNZeXuFKLclAFJfe92ajOX7n0ULsvEi5jBoDU-Ns8,123
44
44
  jaclang/compiler/passes/main/tests/fixtures/defs_and_uses.jac,sha256=zTTq_0u8ITmODu8rjRloI5Imwf2dICHdiKdOnzcgpbg,901
45
- jaclang/compiler/passes/main/tests/fixtures/fstrings.jac,sha256=6QRZtTSuG1vIA7egTv-rY27U6HRaXeiOyuNs1sIU5Bk,1089
45
+ jaclang/compiler/passes/main/tests/fixtures/fstrings.jac,sha256=d47PXLSX2GKekOv4mzZxmBWVRF4AGrs6rm6XA_7NCrQ,1135
46
46
  jaclang/compiler/passes/main/tests/fixtures/func.jac,sha256=i175hPkR4tgf5SMZOrrCHjAE12mVlf6qUsu0mcJmJBE,297
47
47
  jaclang/compiler/passes/main/tests/fixtures/func2.jac,sha256=ZxgLe7VA57daLkqoB8MefdEE8dZIoFv2Dq-Zx-yHKxI,124
48
48
  jaclang/compiler/passes/main/tests/fixtures/game1.jac,sha256=oiTadkrYJRUo6ZkHUi7I54J_0GoTTtsNLhhofTlz0uY,263
@@ -164,9 +164,10 @@ jaclang/langserve/tests/test_server.py,sha256=psv23hfxQZnq_pGlY1Xf9S2oUJk2QpYMPm
164
164
  jaclang/langserve/utils.py,sha256=rtFO1OYrgU6RmFhNs43anZac79sUwe3oZxlYB0s3CXs,14522
165
165
  jaclang/plugin/__init__.py,sha256=5t2krHKt_44PrCTGojzxEimxpNHYVQcn89jAiCSXE_k,165
166
166
  jaclang/plugin/builtin.py,sha256=zNTbe5knJrGFgJRa4l4hMzzuij6iXFyVqRTxputUHIo,1307
167
- jaclang/plugin/default.py,sha256=eAM8CJ0hCV5bvxQgtIdb70EGiFAS8XE9N3Vxzzsygus,45213
168
- jaclang/plugin/feature.py,sha256=jJkpdaJ8dmz80RjcBn36Ik9GzrvpB5gD3kmhSBqykRc,16571
169
- jaclang/plugin/spec.py,sha256=LIIv2v7j9ij6VGH1_tIRingzn6OVgeEusZakNskQf9Y,14299
167
+ jaclang/plugin/default.py,sha256=yluaC_rwOKZwbveMU3dhYScHeRCNt3jIV1cACfkBvG8,45438
168
+ jaclang/plugin/feature.py,sha256=FhkzyPTk1N0faruRlyX13NYSPsRj6g--Jzfwes-_osE,16602
169
+ jaclang/plugin/plugin.md,sha256=B252QTH3c8uZyvXTbGmZBafZtdXstFC5vT5jIN_gS4U,9994
170
+ jaclang/plugin/spec.py,sha256=-ZaDdVfKLwQ0TgxvSZq4YQheNxyR6ljICIUthjRlm4g,14346
170
171
  jaclang/plugin/tests/__init__.py,sha256=rn_tNG8jCHWwBc_rx4yFkGc4N1GISb7aPuTFVRTvrTk,38
171
172
  jaclang/plugin/tests/fixtures/impl_match.jac,sha256=WEhcA1GlovusITEFO2bOjYYqiiULyYGKhM17uK2GqnI,91
172
173
  jaclang/plugin/tests/fixtures/impl_match_impl.jac,sha256=k1385r7Hdlq6mUKxEHa3VOKJUIWH08hYg2kErhbYwFM,31
@@ -179,13 +180,13 @@ jaclang/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
179
180
  jaclang/runtimelib/__init__.py,sha256=jDDYBCV82qPhmcDVk3NIvHbhng0ebSrXD3xrojg0-eo,34
180
181
  jaclang/runtimelib/architype.py,sha256=_4xCawHqmM5ASXwq9wxjStvqJlPdi9zJ5wvKU_QFt6U,7910
181
182
  jaclang/runtimelib/constructs.py,sha256=1ARnsPrDi1UvyaFRhGRhO0kj0fnIZ2HbHF7O3itB-ZQ,796
182
- jaclang/runtimelib/context.py,sha256=8WkCxs_qnp311R6FdKLBSOd8hS2XXnHJgQheU7QVWJE,5480
183
+ jaclang/runtimelib/context.py,sha256=DjCkj1S6WLBWbNMkhUjqPYIhxqXV0XjJ1Mpjy7WR4g0,5538
183
184
  jaclang/runtimelib/importer.py,sha256=EzttjsUvcmuWkeqjyThRlCzsEu2rVHD8yhzy3WWOlQE,14463
184
185
  jaclang/runtimelib/machine.py,sha256=snxNctPZPlCZxYgQRcFBDl-BTvzG8lnwG-hrtkgytU8,10829
185
186
  jaclang/runtimelib/memory.py,sha256=SlzDYNi_R1Jj5WfLfW2y0Rta5GAD6CIKiONEo4LbfHI,5033
186
187
  jaclang/runtimelib/test.py,sha256=HRCl3cf0uPTe58Kcx_sBUb6ow8J53rnmpFOhA7g9oAA,2851
187
188
  jaclang/runtimelib/utils.py,sha256=P9gVE3XFhRzr745RCDXXIP391AcsL4aL_6HrXws_qa4,8155
188
- jaclang/settings.py,sha256=381YK66eXqDSnWhzTHMHfbmvwfQPEI_1yPLa0RFwzKo,3553
189
+ jaclang/settings.py,sha256=iLgVEA2fyARM5u-qMMMaEvNr88Qxej2NGZviw-R95kU,3681
189
190
  jaclang/tests/fixtures/abc.jac,sha256=HZvLz6IEt3Snlgg8Czs-N4emLjg4fT3IbTo95d3Gdww,1747
190
191
  jaclang/tests/fixtures/access_checker.jac,sha256=UVoY7sYW-R0ms2HDA4HXQ5xJNiW0vEbY2T5CCY1avus,281
191
192
  jaclang/tests/fixtures/access_modifier.jac,sha256=NJHXbu_N_cWpTkjJnwcHzWkEk2kroaQ8aaalVxPXAW8,2587
@@ -198,7 +199,7 @@ jaclang/tests/fixtures/baddy.jac,sha256=waLlwMyW_JCE1x_SuVzRER1RBe1j3XiLTw-0Njzn
198
199
  jaclang/tests/fixtures/baddy.test.jac,sha256=Uq-Nlf44QUAtbOfDCbc9_ceLxmo31PILDTSzAv8nJq4,33
199
200
  jaclang/tests/fixtures/bar.jac,sha256=XZWOrzgMQed2R611DLfzCvWUT4a4gTYZXWRYvizMb18,782
200
201
  jaclang/tests/fixtures/blankwithentry.jac,sha256=lnMDDKyKnldsUIx1AVCIHt47KY3gR2CZYhox8663sLM,53
201
- jaclang/tests/fixtures/builtin_dotgen.jac,sha256=1CCJTSmMD1Zt_FkC-poPGyHRV3rIcst616UtYfuLIrE,1830
202
+ jaclang/tests/fixtures/builtin_dotgen.jac,sha256=U2r_bmSsMDuJWuo9vYoRCgRIo9NA9-VkaaiacvAMeS8,1814
202
203
  jaclang/tests/fixtures/builtins_test.jac,sha256=1eJXipIFpa8IDjKv20TjAW_k4hTtJzNT1cKnQOAVt28,244
203
204
  jaclang/tests/fixtures/byllmissue.jac,sha256=vAwxzbRNx5yOM3HTDSH7wafPYXU7AunBOZmgdsT2rhc,86
204
205
  jaclang/tests/fixtures/chandra_bugs.jac,sha256=vcBjZ4P7S1PPUs-_0Stt779pus95RJTMs1x_-m0w7yY,282
@@ -226,7 +227,7 @@ jaclang/tests/fixtures/edge_ops.jac,sha256=b6XsApxIQUelPPAfReQor3ha2iDtAbNVpcihx
226
227
  jaclang/tests/fixtures/edges_walk.jac,sha256=nj_uxQ8Kx1x1ghIf010OngxlpPu8Ah1Y7kfYLGJ4oPo,798
227
228
  jaclang/tests/fixtures/edgetypeissue.jac,sha256=ZsJuNdtmD_fu2b7sDJ_tWZjoDI_rxouDEcSWkahhBS0,118
228
229
  jaclang/tests/fixtures/entry_exit.jac,sha256=Vl4f5TNCXEfTDurPiOnPWShW15RWAp5Rm4L1tI5bXOo,763
229
- jaclang/tests/fixtures/enum_inside_archtype.jac,sha256=EiuL9szE0ISfeczoVcnZyw0eK1n6vc6_koDf0cHgoh4,236
230
+ jaclang/tests/fixtures/enum_inside_archtype.jac,sha256=_H4eKBDAO_DfCinAK3aWUOa59XUFvUZTZn5ClhrpdLc,428
230
231
  jaclang/tests/fixtures/err.impl.jac,sha256=bCW5RiPOoiEiBJCcCEsPsegBTA98mqY57UYiq5O2Skg,41
231
232
  jaclang/tests/fixtures/err.jac,sha256=Df-QWvUlVa2Tc3QtKXNv4VU63Xefmp_iC-BS-1VuOEI,62
232
233
  jaclang/tests/fixtures/err2.jac,sha256=x8h69NTVMGJa_UicY-CZblLMdeH09myTeiYqNFamiK0,50
@@ -295,7 +296,7 @@ jaclang/tests/fixtures/walker_update.jac,sha256=_bN3ASAN6LpfIQFfDMRnrx2oteM-ef7O
295
296
  jaclang/tests/fixtures/with_context.jac,sha256=cDA_4YWe5UVmQRgcpktzkZ_zsswQpV_T2Otf_rFnPy8,466
296
297
  jaclang/tests/test_bugs.py,sha256=tBPsIlSPqZDIz4QaScNRT-WdGIdJ0uU-aRBWq1XUZ6o,555
297
298
  jaclang/tests/test_cli.py,sha256=7PYJvJeKKb13yyP0TQ_pHbdRowWN5TI7kG-tNUESbaI,13461
298
- jaclang/tests/test_language.py,sha256=w8eRU328MzcB2P42RwYYKd-X6LvDjaQOuJBkdohyGXk,47199
299
+ jaclang/tests/test_language.py,sha256=2bPSFWyXDiDkIG7T0CyC5opJUcgP5CIGlVOiS7oaYYU,47291
299
300
  jaclang/tests/test_man_code.py,sha256=ZdNarlZVfT_-8Jv3FjLplHw76tsvkCuISyfX3M4qxPg,5027
300
301
  jaclang/tests/test_reference.py,sha256=FISQpZbB8cmRoAeJOFfXUy13WVxykZjpkPSb1OTotfI,3340
301
302
  jaclang/tests/test_settings.py,sha256=TIX5uiu8H9IpZN2__uFiclcdCpBpPpcAwtlEHyFC4kk,1999
@@ -1529,7 +1530,7 @@ jaclang/vendor/typing_extensions-4.12.2.dist-info/METADATA,sha256=BeUQIa8cnYbrjW
1529
1530
  jaclang/vendor/typing_extensions-4.12.2.dist-info/RECORD,sha256=XS4fBVrPI7kaNZ56Ggl2RGa76jySWLqTzcrUpZIQTVM,418
1530
1531
  jaclang/vendor/typing_extensions-4.12.2.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
1531
1532
  jaclang/vendor/typing_extensions.py,sha256=gwekpyG9DVG3lxWKX4ni8u7nk3We5slG98mA9F3DJQw,134451
1532
- jaclang-0.7.23.dist-info/METADATA,sha256=XSXIBvGPoXmAI8OJ17_Xz6-bJAzWKOa6HzHwd1n-zZE,4914
1533
- jaclang-0.7.23.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
1534
- jaclang-0.7.23.dist-info/entry_points.txt,sha256=8sMi4Tvi9f8tQDN2QAXsSA2icO27zQ4GgEdph6bNEZM,49
1535
- jaclang-0.7.23.dist-info/RECORD,,
1533
+ jaclang-0.7.24.dist-info/METADATA,sha256=ceCbSxyPiyxFmhTui2WbFLMHFhOKLDJsDTe5VVRWU9A,4965
1534
+ jaclang-0.7.24.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
1535
+ jaclang-0.7.24.dist-info/entry_points.txt,sha256=8sMi4Tvi9f8tQDN2QAXsSA2icO27zQ4GgEdph6bNEZM,49
1536
+ jaclang-0.7.24.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.9.0
2
+ Generator: poetry-core 1.9.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any