jaclang 0.0.6__py3-none-any.whl → 0.0.8__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.

Files changed (82) hide show
  1. jaclang/__init__.py +2 -1
  2. jaclang/cli/__jac_gen__/__init__.py +0 -0
  3. jaclang/cli/__jac_gen__/cli.py +175 -0
  4. jaclang/cli/__jac_gen__/cmds.py +132 -0
  5. jaclang/cli/cmds.jac +3 -0
  6. jaclang/cli/impl/__jac_gen__/__init__.py +0 -0
  7. jaclang/cli/impl/__jac_gen__/cli_impl.py +16 -0
  8. jaclang/cli/impl/__jac_gen__/cmds_impl.py +26 -0
  9. jaclang/cli/impl/cmds_impl.jac +17 -3
  10. jaclang/core/__jac_gen__/__init__.py +0 -0
  11. jaclang/core/__jac_gen__/primitives.py +567 -0
  12. jaclang/core/impl/__jac_gen__/__init__.py +0 -0
  13. jaclang/core/impl/__jac_gen__/arch_impl.py +24 -0
  14. jaclang/core/impl/__jac_gen__/element_impl.py +26 -0
  15. jaclang/core/impl/__jac_gen__/exec_ctx_impl.py +12 -0
  16. jaclang/core/impl/__jac_gen__/memory_impl.py +14 -0
  17. jaclang/core/impl/element_impl.jac +2 -2
  18. jaclang/core/primitives.jac +1 -0
  19. jaclang/jac/absyntree.py +65 -42
  20. jaclang/jac/constant.py +4 -0
  21. jaclang/jac/importer.py +18 -60
  22. jaclang/jac/langserve.py +26 -0
  23. jaclang/jac/lexer.py +9 -1
  24. jaclang/jac/parser.py +135 -123
  25. jaclang/jac/passes/blue/ast_build_pass.py +410 -353
  26. jaclang/jac/passes/blue/blue_pygen_pass.py +15 -0
  27. jaclang/jac/passes/blue/decl_def_match_pass.py +33 -21
  28. jaclang/jac/passes/blue/import_pass.py +1 -1
  29. jaclang/jac/passes/blue/pyout_pass.py +47 -12
  30. jaclang/jac/passes/blue/sym_tab_build_pass.py +38 -127
  31. jaclang/jac/passes/blue/tests/test_ast_build_pass.py +2 -2
  32. jaclang/jac/passes/blue/tests/test_blue_pygen_pass.py +9 -30
  33. jaclang/jac/passes/blue/tests/test_decl_def_match_pass.py +13 -13
  34. jaclang/jac/passes/blue/tests/test_sym_tab_build_pass.py +6 -4
  35. jaclang/jac/passes/ir_pass.py +1 -1
  36. jaclang/jac/passes/purple/__jac_gen__/__init__.py +0 -0
  37. jaclang/jac/passes/purple/__jac_gen__/analyze_pass.py +37 -0
  38. jaclang/jac/passes/purple/__jac_gen__/purple_pygen_pass.py +305 -0
  39. jaclang/jac/passes/purple/impl/__jac_gen__/__init__.py +0 -0
  40. jaclang/jac/passes/purple/impl/__jac_gen__/purple_pygen_pass_impl.py +23 -0
  41. jaclang/jac/symtable.py +12 -4
  42. jaclang/jac/tests/fixtures/__jac_gen__/__init__.py +0 -0
  43. jaclang/jac/tests/fixtures/__jac_gen__/hello_world.py +16 -0
  44. jaclang/jac/tests/fixtures/fam.jac +7 -8
  45. jaclang/jac/transform.py +4 -3
  46. jaclang/jac/transpiler.py +13 -9
  47. jaclang/utils/fstring_parser.py +2 -2
  48. jaclang/utils/helpers.py +41 -0
  49. jaclang/utils/test.py +30 -0
  50. jaclang/vendor/__init__.py +1 -0
  51. jaclang/vendor/pygls/__init__.py +25 -0
  52. jaclang/vendor/pygls/capabilities.py +502 -0
  53. jaclang/vendor/pygls/client.py +176 -0
  54. jaclang/vendor/pygls/constants.py +26 -0
  55. jaclang/vendor/pygls/exceptions.py +220 -0
  56. jaclang/vendor/pygls/feature_manager.py +241 -0
  57. jaclang/vendor/pygls/lsp/__init__.py +139 -0
  58. jaclang/vendor/pygls/lsp/client.py +2224 -0
  59. jaclang/vendor/pygls/lsprotocol/__init__.py +2 -0
  60. jaclang/vendor/pygls/lsprotocol/_hooks.py +1233 -0
  61. jaclang/vendor/pygls/lsprotocol/converters.py +17 -0
  62. jaclang/vendor/pygls/lsprotocol/types.py +12820 -0
  63. jaclang/vendor/pygls/lsprotocol/validators.py +47 -0
  64. jaclang/vendor/pygls/progress.py +79 -0
  65. jaclang/vendor/pygls/protocol.py +1184 -0
  66. jaclang/vendor/pygls/server.py +620 -0
  67. jaclang/vendor/pygls/uris.py +184 -0
  68. jaclang/vendor/pygls/workspace/__init__.py +81 -0
  69. jaclang/vendor/pygls/workspace/position.py +204 -0
  70. jaclang/vendor/pygls/workspace/text_document.py +234 -0
  71. jaclang/vendor/pygls/workspace/workspace.py +311 -0
  72. {jaclang-0.0.6.dist-info → jaclang-0.0.8.dist-info}/METADATA +1 -1
  73. jaclang-0.0.8.dist-info/RECORD +118 -0
  74. jaclang/core/jaclang.jac +0 -62
  75. jaclang-0.0.6.dist-info/RECORD +0 -76
  76. /jaclang/{utils → vendor}/sly/__init__.py +0 -0
  77. /jaclang/{utils → vendor}/sly/docparse.py +0 -0
  78. /jaclang/{utils → vendor}/sly/lex.py +0 -0
  79. /jaclang/{utils → vendor}/sly/yacc.py +0 -0
  80. {jaclang-0.0.6.dist-info → jaclang-0.0.8.dist-info}/WHEEL +0 -0
  81. {jaclang-0.0.6.dist-info → jaclang-0.0.8.dist-info}/entry_points.txt +0 -0
  82. {jaclang-0.0.6.dist-info → jaclang-0.0.8.dist-info}/top_level.txt +0 -0
jaclang/jac/parser.py CHANGED
@@ -3,9 +3,11 @@
3
3
  from typing import Generator, Optional
4
4
 
5
5
  import jaclang.jac.absyntree as ast
6
+ from jaclang.jac.constant import Constants as Con
6
7
  from jaclang.jac.lexer import JacLexer
7
8
  from jaclang.jac.transform import ABCParserMeta, Transform
8
- from jaclang.utils.sly.yacc import Parser, YaccProduction
9
+ from jaclang.utils.helpers import dedent_code_block
10
+ from jaclang.vendor.sly.yacc import Parser, YaccProduction
9
11
 
10
12
 
11
13
  _ = None # For flake8 linting
@@ -55,22 +57,22 @@ class JacParser(Transform, Parser, metaclass=ABCParserMeta):
55
57
  # Element types
56
58
  # -------------
57
59
  @_(
58
- "global_var",
59
- "test",
60
- "mod_code",
60
+ "doc_tag global_var",
61
+ "doc_tag test",
62
+ "doc_tag mod_code",
61
63
  "import_stmt",
62
64
  "include_stmt",
63
- "architype",
64
- "ability",
65
- "enum",
65
+ "doc_tag architype",
66
+ "doc_tag ability",
67
+ "python_code_block",
66
68
  )
67
69
  def element(self, p: YaccProduction) -> YaccProduction:
68
70
  """Element rule."""
69
71
  return p
70
72
 
71
73
  @_(
72
- "doc_tag KW_GLOBAL access_tag assignment_list SEMI",
73
- "doc_tag KW_FREEZE access_tag assignment_list SEMI",
74
+ "KW_GLOBAL access_tag assignment_list SEMI",
75
+ "KW_FREEZE access_tag assignment_list SEMI",
74
76
  )
75
77
  def global_var(self, p: YaccProduction) -> YaccProduction:
76
78
  """Global variable rule."""
@@ -94,16 +96,16 @@ class JacParser(Transform, Parser, metaclass=ABCParserMeta):
94
96
  return p
95
97
 
96
98
  @_(
97
- "doc_tag KW_TEST NAME code_block",
98
- "doc_tag KW_TEST code_block",
99
+ "KW_TEST NAME code_block",
100
+ "KW_TEST code_block",
99
101
  )
100
102
  def test(self, p: YaccProduction) -> YaccProduction:
101
103
  """Test rule."""
102
104
  return p
103
105
 
104
106
  @_(
105
- "doc_tag KW_WITH KW_ENTRY code_block",
106
- "doc_tag KW_WITH KW_ENTRY sub_name code_block",
107
+ "KW_WITH KW_ENTRY code_block",
108
+ "KW_WITH KW_ENTRY sub_name code_block",
107
109
  )
108
110
  def mod_code(self, p: YaccProduction) -> YaccProduction:
109
111
  """Module-level free code rule."""
@@ -117,6 +119,11 @@ class JacParser(Transform, Parser, metaclass=ABCParserMeta):
117
119
  """Doc tag rule."""
118
120
  return p
119
121
 
122
+ @_("PYNLINE")
123
+ def python_code_block(self, p: YaccProduction) -> YaccProduction:
124
+ """Python code block rule."""
125
+ return p
126
+
120
127
  # Import Statements
121
128
  # -----------------
122
129
  @_(
@@ -173,25 +180,22 @@ class JacParser(Transform, Parser, metaclass=ABCParserMeta):
173
180
  @_(
174
181
  "architype_decl",
175
182
  "architype_def",
183
+ "enum",
184
+ "decorator architype",
176
185
  )
177
186
  def architype(self, p: YaccProduction) -> YaccProduction:
178
187
  """Architype rule."""
179
188
  return p
180
189
 
181
190
  @_(
182
- "doc_tag arch_type access_tag NAME inherited_archs SEMI",
183
- "doc_tag decorators arch_type access_tag NAME inherited_archs SEMI",
184
- "doc_tag arch_type access_tag NAME inherited_archs member_block",
185
- "doc_tag decorators arch_type access_tag NAME inherited_archs member_block",
191
+ "arch_type access_tag NAME inherited_archs SEMI",
192
+ "arch_type access_tag NAME inherited_archs member_block",
186
193
  )
187
194
  def architype_decl(self, p: YaccProduction) -> YaccProduction:
188
195
  """Architype declaration rule."""
189
196
  return p
190
197
 
191
- @_(
192
- "doc_tag strict_arch_ref member_block",
193
- "doc_tag dotted_name strict_arch_ref member_block",
194
- )
198
+ @_("abil_to_arch_chain member_block")
195
199
  def architype_def(self, p: YaccProduction) -> YaccProduction:
196
200
  """Architype definition rule."""
197
201
  return p
@@ -206,11 +210,8 @@ class JacParser(Transform, Parser, metaclass=ABCParserMeta):
206
210
  """Arch type rule."""
207
211
  return p
208
212
 
209
- @_(
210
- "DECOR_OP atom",
211
- "decorators DECOR_OP atom",
212
- )
213
- def decorators(self, p: YaccProduction) -> YaccProduction:
213
+ @_("DECOR_OP atom")
214
+ def decorator(self, p: YaccProduction) -> YaccProduction:
214
215
  """Python style decorator rule."""
215
216
  return p
216
217
 
@@ -258,7 +259,7 @@ class JacParser(Transform, Parser, metaclass=ABCParserMeta):
258
259
 
259
260
  @_(
260
261
  "esc_name",
261
- "arch_ref",
262
+ "global_ref",
262
263
  )
263
264
  def named_refs(self, p: YaccProduction) -> YaccProduction:
264
265
  """All reference rules."""
@@ -275,53 +276,87 @@ class JacParser(Transform, Parser, metaclass=ABCParserMeta):
275
276
  """All reference rules."""
276
277
  return p
277
278
 
279
+ # Enum elements
280
+ # ----------------
281
+ @_(
282
+ "enum_decl",
283
+ "enum_def",
284
+ )
285
+ def enum(self, p: YaccProduction) -> YaccProduction:
286
+ """Enum rule."""
287
+ return p
288
+
289
+ @_(
290
+ "KW_ENUM access_tag NAME inherited_archs SEMI",
291
+ "KW_ENUM access_tag NAME inherited_archs enum_block",
292
+ )
293
+ def enum_decl(self, p: YaccProduction) -> YaccProduction:
294
+ """Enum decl rule."""
295
+ return p
296
+
297
+ @_("arch_to_enum_chain enum_block")
298
+ def enum_def(self, p: YaccProduction) -> YaccProduction:
299
+ """Enum def rule."""
300
+ return p
301
+
302
+ @_(
303
+ "LBRACE RBRACE",
304
+ "LBRACE enum_stmt_list RBRACE",
305
+ )
306
+ def enum_block(self, p: YaccProduction) -> YaccProduction:
307
+ """Enum block rule."""
308
+ return p
309
+
310
+ @_(
311
+ "NAME",
312
+ "enum_op_assign",
313
+ "enum_stmt_list COMMA NAME",
314
+ "enum_stmt_list COMMA enum_op_assign",
315
+ )
316
+ def enum_stmt_list(self, p: YaccProduction) -> YaccProduction:
317
+ """Enum op list rule."""
318
+ return p
319
+
320
+ @_(
321
+ "NAME EQ expression",
322
+ )
323
+ def enum_op_assign(self, p: YaccProduction) -> YaccProduction:
324
+ """Enum op assign rule."""
325
+ return p
326
+
278
327
  # Ability elements
279
328
  # ----------------
280
329
  @_(
281
330
  "ability_decl",
282
331
  "KW_ASYNC ability_decl",
283
332
  "ability_def",
333
+ "decorator ability",
284
334
  )
285
335
  def ability(self, p: YaccProduction) -> YaccProduction:
286
336
  """Ability rule."""
287
337
  return p
288
338
 
289
339
  @_(
290
- "doc_tag static_tag KW_CAN access_tag all_refs event_clause SEMI",
291
- "doc_tag static_tag KW_CAN access_tag all_refs func_decl SEMI",
292
- "doc_tag static_tag KW_CAN access_tag all_refs event_clause code_block",
293
- "doc_tag static_tag KW_CAN access_tag all_refs func_decl code_block",
294
- "ability_decl_decor",
340
+ "static_tag KW_CAN access_tag all_refs event_clause SEMI",
341
+ "static_tag KW_CAN access_tag all_refs func_decl SEMI",
342
+ "static_tag KW_CAN access_tag all_refs event_clause code_block",
343
+ "static_tag KW_CAN access_tag all_refs func_decl code_block",
295
344
  )
296
345
  def ability_decl(self, p: YaccProduction) -> YaccProduction:
297
346
  """Ability rule."""
298
347
  return p
299
348
 
300
349
  @_(
301
- "doc_tag decorators static_tag KW_CAN access_tag all_refs event_clause SEMI",
302
- "doc_tag decorators static_tag KW_CAN access_tag all_refs func_decl SEMI",
303
- "doc_tag decorators static_tag KW_CAN access_tag all_refs event_clause code_block",
304
- "doc_tag decorators static_tag KW_CAN access_tag all_refs func_decl code_block",
305
- )
306
- def ability_decl_decor(self, p: YaccProduction) -> YaccProduction:
307
- """Ability declaration rule."""
308
- return p
309
-
310
- @_(
311
- "doc_tag ability_ref event_clause code_block",
312
- "doc_tag dotted_name ability_ref event_clause code_block",
313
- "doc_tag ability_ref func_decl code_block",
314
- "doc_tag dotted_name ability_ref func_decl code_block",
350
+ "arch_to_abil_chain event_clause code_block",
351
+ "arch_to_abil_chain func_decl code_block",
315
352
  )
316
353
  def ability_def(self, p: YaccProduction) -> YaccProduction:
317
354
  """Ability rule."""
318
355
  return p
319
356
 
320
357
  @_(
321
- "doc_tag static_tag KW_CAN access_tag all_refs event_clause KW_ABSTRACT SEMI",
322
- "doc_tag static_tag KW_CAN access_tag all_refs func_decl KW_ABSTRACT SEMI",
323
- "doc_tag decorators static_tag KW_CAN access_tag all_refs event_clause KW_ABSTRACT SEMI",
324
- "doc_tag decorators static_tag KW_CAN access_tag all_refs func_decl KW_ABSTRACT SEMI",
358
+ "static_tag KW_CAN access_tag all_refs event_clause KW_ABSTRACT SEMI",
359
+ "static_tag KW_CAN access_tag all_refs func_decl KW_ABSTRACT SEMI",
325
360
  )
326
361
  def abstract_ability(self, p: YaccProduction) -> YaccProduction:
327
362
  """Abstract ability rule."""
@@ -366,59 +401,6 @@ class JacParser(Transform, Parser, metaclass=ABCParserMeta):
366
401
  """Parameter variable rule rule."""
367
402
  return p
368
403
 
369
- # Enum elements
370
- # ----------------
371
- @_(
372
- "enum_decl",
373
- "enum_def",
374
- )
375
- def enum(self, p: YaccProduction) -> YaccProduction:
376
- """Enum rule."""
377
- return p
378
-
379
- @_(
380
- "doc_tag KW_ENUM access_tag NAME inherited_archs SEMI",
381
- "doc_tag KW_ENUM access_tag NAME inherited_archs enum_block",
382
- "doc_tag decorators KW_ENUM access_tag NAME inherited_archs SEMI",
383
- "doc_tag decorators KW_ENUM access_tag NAME inherited_archs enum_block",
384
- )
385
- def enum_decl(self, p: YaccProduction) -> YaccProduction:
386
- """Enum decl rule."""
387
- return p
388
-
389
- @_(
390
- "doc_tag enum_ref enum_block",
391
- "doc_tag dotted_name enum_ref enum_block",
392
- )
393
- def enum_def(self, p: YaccProduction) -> YaccProduction:
394
- """Enum def rule."""
395
- return p
396
-
397
- @_(
398
- "LBRACE RBRACE",
399
- "LBRACE enum_stmt_list RBRACE",
400
- )
401
- def enum_block(self, p: YaccProduction) -> YaccProduction:
402
- """Enum block rule."""
403
- return p
404
-
405
- @_(
406
- "NAME",
407
- "enum_op_assign",
408
- "enum_stmt_list COMMA NAME",
409
- "enum_stmt_list COMMA enum_op_assign",
410
- )
411
- def enum_stmt_list(self, p: YaccProduction) -> YaccProduction:
412
- """Enum op list rule."""
413
- return p
414
-
415
- @_(
416
- "NAME EQ expression",
417
- )
418
- def enum_op_assign(self, p: YaccProduction) -> YaccProduction:
419
- """Enum op assign rule."""
420
- return p
421
-
422
404
  # Attribute blocks
423
405
  # ----------------
424
406
  @_(
@@ -438,9 +420,11 @@ class JacParser(Transform, Parser, metaclass=ABCParserMeta):
438
420
  return p
439
421
 
440
422
  @_(
441
- "has_stmt",
442
- "ability",
443
- "abstract_ability",
423
+ "doc_tag has_stmt",
424
+ "doc_tag architype",
425
+ "doc_tag ability",
426
+ "doc_tag abstract_ability",
427
+ "python_code_block",
444
428
  )
445
429
  def member_stmt(self, p: YaccProduction) -> YaccProduction:
446
430
  """Attribute statement rule."""
@@ -449,8 +433,8 @@ class JacParser(Transform, Parser, metaclass=ABCParserMeta):
449
433
  # Has statements
450
434
  # --------------
451
435
  @_(
452
- "doc_tag static_tag KW_HAS access_tag has_assign_clause SEMI",
453
- "doc_tag static_tag KW_FREEZE access_tag has_assign_clause SEMI",
436
+ "static_tag KW_HAS access_tag has_assign_clause SEMI",
437
+ "static_tag KW_FREEZE access_tag has_assign_clause SEMI",
454
438
  )
455
439
  def has_stmt(self, p: YaccProduction) -> YaccProduction:
456
440
  """Has statement rule."""
@@ -552,8 +536,8 @@ class JacParser(Transform, Parser, metaclass=ABCParserMeta):
552
536
 
553
537
  @_(
554
538
  "import_stmt",
555
- "architype_decl",
556
- "ability_decl",
539
+ "doc_tag architype",
540
+ "doc_tag ability",
557
541
  "typed_ctx_block",
558
542
  "assignment SEMI",
559
543
  "static_assignment",
@@ -572,6 +556,7 @@ class JacParser(Transform, Parser, metaclass=ABCParserMeta):
572
556
  "yield_stmt SEMI",
573
557
  "await_stmt SEMI",
574
558
  "walker_stmt",
559
+ "python_code_block",
575
560
  )
576
561
  def statement(self, p: YaccProduction) -> YaccProduction:
577
562
  """Statement rule."""
@@ -1160,7 +1145,6 @@ class JacParser(Transform, Parser, metaclass=ABCParserMeta):
1160
1145
  "atom DOT_FWD all_refs",
1161
1146
  "atom DOT_BKWD all_refs",
1162
1147
  "atom index_slice",
1163
- "atom arch_ref",
1164
1148
  "atom edge_op_ref",
1165
1149
  "atom filter_compr",
1166
1150
  )
@@ -1173,7 +1157,6 @@ class JacParser(Transform, Parser, metaclass=ABCParserMeta):
1173
1157
  "atom NULL_OK DOT_FWD all_refs",
1174
1158
  "atom NULL_OK DOT_BKWD all_refs",
1175
1159
  "atom NULL_OK index_slice",
1176
- "atom NULL_OK arch_ref",
1177
1160
  "atom NULL_OK edge_op_ref",
1178
1161
  "atom NULL_OK filter_compr",
1179
1162
  )
@@ -1225,25 +1208,49 @@ class JacParser(Transform, Parser, metaclass=ABCParserMeta):
1225
1208
  # Architype reference rules
1226
1209
  # -------------------------
1227
1210
  @_(
1228
- "strict_arch_ref",
1229
- "ability_ref",
1230
- "enum_ref",
1231
- "global_ref",
1211
+ "node_ref",
1212
+ "edge_ref",
1213
+ "walker_ref",
1214
+ "object_ref",
1232
1215
  )
1233
1216
  def arch_ref(self, p: YaccProduction) -> YaccProduction:
1234
- """Architype reference rule."""
1217
+ """Strict Architype reference rule."""
1235
1218
  return p
1236
1219
 
1237
1220
  @_(
1238
- "node_ref",
1239
- "edge_ref",
1240
- "walker_ref",
1241
- "object_ref",
1221
+ "arch_ref",
1222
+ "ability_ref",
1223
+ "arch_or_ability_chain arch_ref",
1224
+ "arch_or_ability_chain ability_ref",
1242
1225
  )
1243
- def strict_arch_ref(self, p: YaccProduction) -> YaccProduction:
1226
+ def arch_or_ability_chain(self, p: YaccProduction) -> YaccProduction:
1244
1227
  """Strict Architype reference rule."""
1245
1228
  return p
1246
1229
 
1230
+ @_(
1231
+ "arch_ref",
1232
+ "arch_or_ability_chain arch_ref",
1233
+ )
1234
+ def abil_to_arch_chain(self, p: YaccProduction) -> YaccProduction:
1235
+ """Strict Architype reference list rule."""
1236
+ return p
1237
+
1238
+ @_(
1239
+ "ability_ref",
1240
+ "arch_or_ability_chain ability_ref",
1241
+ )
1242
+ def arch_to_abil_chain(self, p: YaccProduction) -> YaccProduction:
1243
+ """Strict Architype reference list rule."""
1244
+ return p
1245
+
1246
+ @_(
1247
+ "enum_ref",
1248
+ "arch_or_ability_chain enum_ref",
1249
+ )
1250
+ def arch_to_enum_chain(self, p: YaccProduction) -> YaccProduction:
1251
+ """Strict Architype reference list rule."""
1252
+ return p
1253
+
1247
1254
  @_("NODE_OP NAME")
1248
1255
  def node_ref(self, p: YaccProduction) -> YaccProduction:
1249
1256
  """Node reference rule."""
@@ -1428,7 +1435,7 @@ def parse_tree_to_ast(
1428
1435
  return result
1429
1436
 
1430
1437
  from jaclang.utils.fstring_parser import FStringLexer, FStringParser
1431
- from jaclang.utils.sly.lex import Token as LexToken
1438
+ from jaclang.vendor.sly.lex import Token as LexToken
1432
1439
 
1433
1440
  ast_tree: ast.AstNode = None
1434
1441
  if not isinstance(tree, ast.AstNode):
@@ -1486,6 +1493,11 @@ def parse_tree_to_ast(
1486
1493
  ast_tree = ast.Constant(typ=type(None), **meta)
1487
1494
  elif tree.type.startswith("TYP_"):
1488
1495
  ast_tree = ast.Constant(typ=type, **meta)
1496
+ elif tree.type == "PYNLINE":
1497
+ ast_tree = ast.Token(**meta)
1498
+ ast_tree.value = dedent_code_block(
1499
+ ast_tree.value.replace(f"{Con.PYNLINE}", "")
1500
+ )
1489
1501
  else:
1490
1502
  ast_tree = ast.Token(**meta)
1491
1503
  else: