Skip to content

UniIR Nodes

Enum#

flowchart LR
Enum -->|Name| name
Enum -.->|Token| access
Enum -.->|Expr| base_classes
Enum -.->|Assignment , ImplDef| body
Enum -.->|String| doc
Enum -.->|Expr| decorators

Enum node type for Jac Ast.

Name#

flowchart LR
Name -->|Source| orig_src
Name -->|str| name
Name -->|str| value
Name -->|int| end_line
Name -->|int| col_start
Name -->|int| col_end_____
Name -->|int| pos_start
Name -->|int| pos_end_____
Name -->|bool| is_enum_singleton
Name -->|bool| is_kwesc

Name node type for Jac Ast.

SubTag#

flowchart LR
SubTag -->|T| tag

SubTag node type for Jac Ast.

SubNodeList#

flowchart LR
SubNodeList -->|list - T| items
SubNodeList -.->|Tok| delim
SubNodeList -.->|Token| left_enc
SubNodeList -.->|Token| right_enc

SubNodeList node type for Jac Ast.

Module#

flowchart LR
Module -->|str| name
Module -->|Source| source
Module -.->|String| doc
Module -->|ElementStmt , String , EmptyToken| body
Module -->|list - Token| terminals
Module -->|bool| stub_only

Whole Program node type for Jac Ast.

GlobalVars#

flowchart LR
GlobalVars -.->|Token| access
GlobalVars -->|Assignment| assignments
GlobalVars -->|bool| is_frozen
GlobalVars -.->|String| doc

GlobalVars node type for Jac Ast.

Test#

flowchart LR
Test -->|Name , Token| name
Test -->|CodeBlockStmt| body
Test -.->|String| doc

Test node type for Jac Ast.

ModuleCode#

flowchart LR
ModuleCode -.->|Name| name
ModuleCode -->|CodeBlockStmt| body
ModuleCode -.->|String| doc

ModuleCode node type for Jac Ast.

PyInlineCode#

flowchart LR
PyInlineCode -->|Token| code
PyInlineCode -.->|String| doc

PyInlineCode node type for Jac Ast.

Import#

flowchart LR
Import -.->|ModulePath| from_loc
Import -->|ModuleItem , ModulePath| items
Import -->|bool| is_absorb
Import -.->|String| doc

Import node type for Jac Ast.

ModulePath#

flowchart LR
ModulePath -.->|Name| path
ModulePath -->|int| level
ModulePath -.->|Name| alias

ModulePath node type for Jac Ast.

ModuleItem#

flowchart LR
ModuleItem -->|Name| name
ModuleItem -.->|Name| alias

ModuleItem node type for Jac Ast.

Architype#

flowchart LR
Architype -->|Name| name
Architype -->|Token| arch_type
Architype -.->|Token| access
Architype -.->|Expr| base_classes
Architype -.->|ArchBlockStmt , ImplDef| body
Architype -.->|String| doc
Architype -.->|Expr| decorators

ObjectArch node type for Jac Ast.

ImplDef#

flowchart LR
ImplDef -.->|Expr| decorators
ImplDef -->|NameAtom| target
ImplDef -->|Expr , FuncSignature , EventSignature , None| spec
ImplDef -->|CodeBlockStmt , FuncCall| body
ImplDef -.->|String| doc
ImplDef -.->|UniNode| decl_link

AstImplOnlyNode node type for Jac Ast.

Ability#

flowchart LR
Ability -->|NameAtom| name_ref
Ability -->|bool| is_async
Ability -->|bool| is_override
Ability -->|bool| is_static
Ability -->|bool| is_abstract
Ability -.->|Token| access
Ability -->|FuncSignature , EventSignature , None| signature
Ability -.->|CodeBlockStmt , ImplDef , FuncCall| body
Ability -.->|String| doc
Ability -.->|Expr| decorators

Ability node type for Jac Ast.

FuncSignature#

flowchart LR
FuncSignature -.->|ParamVar| params
FuncSignature -.->|Expr| return_type

FuncSignature node type for Jac Ast.

EventSignature#

flowchart LR
EventSignature -->|Token| event
EventSignature -.->|Expr| arch_tag_info
EventSignature -.->|Expr| return_type

EventSignature node type for Jac Ast.

ParamVar#

flowchart LR
ParamVar -->|Name| name
ParamVar -.->|Token| unpack
ParamVar -->|Expr| type_tag
ParamVar -.->|Expr| value

ParamVar node type for Jac Ast.

ArchHas#

flowchart LR
ArchHas -->|bool| is_static
ArchHas -.->|Token| access
ArchHas -->|HasVar| vars
ArchHas -->|bool| is_frozen
ArchHas -.->|String| doc

ArchHas node type for Jac Ast.

HasVar#

flowchart LR
HasVar -->|Name| name
HasVar -->|Expr| type_tag
HasVar -.->|Expr| value
HasVar -->|bool| defer

HasVar node type for Jac Ast.

TypedCtxBlock#

flowchart LR
TypedCtxBlock -->|Expr| type_ctx
TypedCtxBlock -->|CodeBlockStmt| body

TypedCtxBlock node type for Jac Ast.

IfStmt#

flowchart LR
IfStmt -->|Expr| condition
IfStmt -->|CodeBlockStmt| body
IfStmt -.->|ElseStmt , ElseIf| else_body

IfStmt node type for Jac Ast.

ElseIf#

flowchart LR
ElseIf -->|Expr| condition
ElseIf -->|CodeBlockStmt| body
ElseIf -.->|ElseStmt , ElseIf| else_body

ElseIf node type for Jac Ast.

ElseStmt#

flowchart LR
ElseStmt -->|CodeBlockStmt| body

ElseStmt node type for Jac Ast.

ExprStmt#

flowchart LR
ExprStmt -->|Expr| expr
ExprStmt -->|bool| in_fstring

ExprStmt node type for Jac Ast.

TryStmt#

flowchart LR
TryStmt -->|CodeBlockStmt| body
TryStmt -.->|Except| excepts
TryStmt -.->|ElseStmt| else_body
TryStmt -.->|FinallyStmt| finally_body

TryStmt node type for Jac Ast.

Except#

flowchart LR
Except -->|Expr| ex_type
Except -.->|Name| name
Except -->|CodeBlockStmt| body

Except node type for Jac Ast.

FinallyStmt#

flowchart LR
FinallyStmt -->|CodeBlockStmt| body

FinallyStmt node type for Jac Ast.

IterForStmt#

flowchart LR
IterForStmt -->|Assignment| iter
IterForStmt -->|bool| is_async
IterForStmt -->|Expr| condition
IterForStmt -->|Assignment| count_by
IterForStmt -->|CodeBlockStmt| body
IterForStmt -.->|ElseStmt| else_body

IterForStmt node type for Jac Ast.

InForStmt#

flowchart LR
InForStmt -->|Expr| target
InForStmt -->|bool| is_async
InForStmt -->|Expr| collection
InForStmt -->|CodeBlockStmt| body
InForStmt -.->|ElseStmt| else_body

InForStmt node type for Jac Ast.

WhileStmt#

flowchart LR
WhileStmt -->|Expr| condition
WhileStmt -->|CodeBlockStmt| body

WhileStmt node type for Jac Ast.

WithStmt#

flowchart LR
WithStmt -->|bool| is_async
WithStmt -->|ExprAsItem| exprs
WithStmt -->|CodeBlockStmt| body

WithStmt node type for Jac Ast.

ExprAsItem#

flowchart LR
ExprAsItem -->|Expr| expr
ExprAsItem -.->|Expr| alias

ExprAsItem node type for Jac Ast.

RaiseStmt#

flowchart LR
RaiseStmt -.->|Expr| cause
RaiseStmt -.->|Expr| from_target

RaiseStmt node type for Jac Ast.

AssertStmt#

flowchart LR
AssertStmt -->|Expr| condition
AssertStmt -.->|Expr| error_msg

AssertStmt node type for Jac Ast.

CheckStmt#

flowchart LR
CheckStmt -->|Expr| target

CheckStmt node type for Jac Ast.

CtrlStmt#

flowchart LR
CtrlStmt -->|Token| ctrl

CtrlStmt node type for Jac Ast.

DeleteStmt#

flowchart LR
DeleteStmt -->|Expr| target

DeleteStmt node type for Jac Ast.

ReportStmt#

flowchart LR
ReportStmt -->|Expr| expr

ReportStmt node type for Jac Ast.

ReturnStmt#

flowchart LR
ReturnStmt -.->|Expr| expr

ReturnStmt node type for Jac Ast.

IgnoreStmt#

flowchart LR
IgnoreStmt -->|Expr| target

IgnoreStmt node type for Jac Ast.

VisitStmt#

flowchart LR
VisitStmt -.->|Expr| insert_loc
VisitStmt -->|Expr| target
VisitStmt -.->|ElseStmt| else_body

VisitStmt node type for Jac Ast.

AwaitExpr#

flowchart LR
AwaitExpr -->|Expr| target

AwaitExpr node type for Jac Ast.

GlobalStmt#

flowchart LR
GlobalStmt -->|NameAtom| target

GlobalStmt node type for Jac Ast.

NonLocalStmt#

flowchart LR
NonLocalStmt -->|NameAtom| target

NonLocalStmt node type for Jac Ast.

Assignment#

flowchart LR
Assignment -->|Expr| target
Assignment -.->|Expr , YieldExpr| value
Assignment -.->|Expr| type_tag
Assignment -->|bool| mutable
Assignment -.->|Token| aug_op
Assignment -->|bool| is_enum_stmt

Assignment node type for Jac Ast.

BinaryExpr#

flowchart LR
BinaryExpr -->|Expr| left
BinaryExpr -->|Expr| right
BinaryExpr -->|Token , DisconnectOp , ConnectOp| op

BinaryExpr node type for Jac Ast.

CompareExpr#

flowchart LR
CompareExpr -->|Expr| left
CompareExpr -->|list - Expr| rights
CompareExpr -->|list - Token| ops

CompareExpr node type for Jac Ast.

Bool#

flowchart LR
Bool -->|Source| orig_src
Bool -->|str| name
Bool -->|str| value
Bool -->|int| end_line
Bool -->|int| col_start
Bool -->|int| col_end_____
Bool -->|int| pos_start
Bool -->|int| pos_end_____

Bool node type for Jac Ast.

BoolExpr#

flowchart LR
BoolExpr -->|Token| op
BoolExpr -->|list - Expr| values

BoolExpr node type for Jac Ast.

LambdaExpr#

flowchart LR
LambdaExpr -->|Expr| body
LambdaExpr -.->|FuncSignature| signature

LambdaExpr node type for Jac Ast.

UnaryExpr#

flowchart LR
UnaryExpr -->|Expr| operand
UnaryExpr -->|Token| op

UnaryExpr node type for Jac Ast.

IfElseExpr#

flowchart LR
IfElseExpr -->|Expr| condition
IfElseExpr -->|Expr| value
IfElseExpr -->|Expr| else_value

IfElseExpr node type for Jac Ast.

MultiString#

flowchart LR
MultiString -->|String , FString| strings

MultiString node type for Jac Ast.

FString#

flowchart LR
FString -.->|String , ExprStmt| parts

FString node type for Jac Ast.

ListVal#

flowchart LR
ListVal -.->|Expr| values

ListVal node type for Jac Ast.

SetVal#

flowchart LR
SetVal -.->|Expr| values

SetVal node type for Jac Ast.

TupleVal#

flowchart LR
TupleVal -.->|Expr , KWPair| values

TupleVal node type for Jac Ast.

DictVal#

flowchart LR
DictVal -->|KVPair| kv_pairs

DictVal node type for Jac Ast.

KVPair#

flowchart LR
KVPair -.->|Expr| key
KVPair -->|Expr| value

KVPair node type for Jac Ast.

KWPair#

flowchart LR
KWPair -.->|NameAtom| key
KWPair -->|Expr| value

KWPair node type for Jac Ast.

InnerCompr#

flowchart LR
InnerCompr -->|bool| is_async
InnerCompr -->|Expr| target
InnerCompr -->|Expr| collection
InnerCompr -.->|list - Expr| conditional

InnerCompr node type for Jac Ast.

ListCompr#

flowchart LR
ListCompr -->|Expr| out_expr
ListCompr -->|list - InnerCompr| compr

ListCompr node type for Jac Ast.

GenCompr#

flowchart LR
GenCompr -->|Expr| out_expr
GenCompr -->|list - InnerCompr| compr

GenCompr node type for Jac Ast.

SetCompr#

flowchart LR
SetCompr -->|Expr| out_expr
SetCompr -->|list - InnerCompr| compr

SetCompr node type for Jac Ast.

DictCompr#

flowchart LR
DictCompr -->|KVPair| kv_pair
DictCompr -->|list - InnerCompr| compr

DictCompr node type for Jac Ast.

AtomTrailer#

flowchart LR
AtomTrailer -->|Expr| target
AtomTrailer -->|AtomExpr , Expr| right
AtomTrailer -->|bool| is_attr
AtomTrailer -->|bool| is_null_ok
AtomTrailer -->|bool| is_genai

AtomTrailer node type for Jac Ast.

AtomUnit#

flowchart LR
AtomUnit -->|Expr , YieldExpr| value

AtomUnit node type for Jac Ast.

YieldExpr#

flowchart LR
YieldExpr -.->|Expr| expr
YieldExpr -->|bool| with_from

YieldExpr node type for Jac Ast.

FuncCall#

flowchart LR
FuncCall -->|Expr| target
FuncCall -.->|Expr , KWPair| params
FuncCall -.->|FuncCall| genai_call

FuncCall node type for Jac Ast.

IndexSlice#

flowchart LR
IndexSlice -->|list - Slice| slices
IndexSlice -->|bool| is_range

IndexSlice node type for Jac Ast.

TypeRef#

flowchart LR
TypeRef -->|NameAtom| target

ArchRef node type for Jac Ast.

EdgeRefTrailer#

flowchart LR
EdgeRefTrailer -->|list - Expr , FilterCompr| chain
EdgeRefTrailer -->|bool| edges_only

EdgeRefTrailer node type for Jac Ast.

EdgeOpRef#

flowchart LR
EdgeOpRef -.->|FilterCompr| filter_cond
EdgeOpRef -->|EdgeDir| edge_dir

EdgeOpRef node type for Jac Ast.

DisconnectOp#

flowchart LR
DisconnectOp -->|EdgeOpRef| edge_spec

DisconnectOp node type for Jac Ast.

ConnectOp#

flowchart LR
ConnectOp -.->|Expr| conn_type
ConnectOp -.->|AssignCompr| conn_assign
ConnectOp -->|EdgeDir| edge_dir

ConnectOpRef node type for Jac Ast.

FilterCompr#

flowchart LR
FilterCompr -.->|Expr| f_type
FilterCompr -.->|CompareExpr| compares

FilterCompr node type for Jac Ast.

AssignCompr#

flowchart LR
AssignCompr -->|KWPair| assigns

AssignCompr node type for Jac Ast.

MatchStmt#

flowchart LR
MatchStmt -->|Expr| target
MatchStmt -->|list - MatchCase| cases

MatchStmt node type for Jac Ast.

MatchCase#

flowchart LR
MatchCase -->|MatchPattern| pattern
MatchCase -.->|Expr| guard
MatchCase -->|list - CodeBlockStmt| body

MatchCase node type for Jac Ast.

MatchOr#

flowchart LR
MatchOr -->|list - MatchPattern| patterns

MatchOr node type for Jac Ast.

MatchAs#

flowchart LR
MatchAs -->|NameAtom| name
MatchAs -.->|MatchPattern| pattern

MatchAs node type for Jac Ast.

MatchValue#

flowchart LR
MatchValue -->|Expr| value

MatchValue node type for Jac Ast.

MatchSingleton#

flowchart LR
MatchSingleton -->|Bool , Null| value

MatchSingleton node type for Jac Ast.

MatchSequence#

flowchart LR
MatchSequence -->|list - MatchPattern| values

MatchSequence node type for Jac Ast.

MatchMapping#

flowchart LR
MatchMapping -->|list - MatchKVPair , MatchStar| values

MatchMapping node type for Jac Ast.

MatchKVPair#

flowchart LR
MatchKVPair -->|MatchPattern , NameAtom , AtomExpr| key
MatchKVPair -->|MatchPattern| value

MatchKVPair node type for Jac Ast.

MatchStar#

flowchart LR
MatchStar -->|NameAtom| name
MatchStar -->|bool| is_list

MatchStar node type for Jac Ast.

MatchArch#

flowchart LR
MatchArch -->|AtomTrailer , NameAtom| name
MatchArch -.->|MatchPattern| arg_patterns
MatchArch -.->|MatchKVPair| kw_patterns

MatchArch node type for Jac Ast.

Token#

flowchart LR
Token -->|Source| orig_src
Token -->|str| name
Token -->|str| value
Token -->|int| end_line
Token -->|int| col_start
Token -->|int| col_end_____
Token -->|int| pos_start
Token -->|int| pos_end_____

Token node type for Jac Ast.

SpecialVarRef#

flowchart LR
SpecialVarRef -->|Name| var

SpecialVarRef node type for Jac Ast.

BuiltinType#

flowchart LR
BuiltinType -->|Source| orig_src
BuiltinType -->|str| name
BuiltinType -->|str| value
BuiltinType -->|int| end_line
BuiltinType -->|int| col_start
BuiltinType -->|int| col_end_____
BuiltinType -->|int| pos_start
BuiltinType -->|int| pos_end_____
BuiltinType -->|bool| is_enum_singleton
BuiltinType -->|bool| is_kwesc

BuiltinType node type for Jac Ast.

Float#

flowchart LR
Float -->|Source| orig_src
Float -->|str| name
Float -->|str| value
Float -->|int| end_line
Float -->|int| col_start
Float -->|int| col_end_____
Float -->|int| pos_start
Float -->|int| pos_end_____

Float node type for Jac Ast.

Int#

flowchart LR
Int -->|Source| orig_src
Int -->|str| name
Int -->|str| value
Int -->|int| end_line
Int -->|int| col_start
Int -->|int| col_end_____
Int -->|int| pos_start
Int -->|int| pos_end_____

Int node type for Jac Ast.

String#

flowchart LR
String -->|Source| orig_src
String -->|str| name
String -->|str| value
String -->|int| end_line
String -->|int| col_start
String -->|int| col_end_____
String -->|int| pos_start
String -->|int| pos_end_____

String node type for Jac Ast.

Null#

flowchart LR
Null -->|Source| orig_src
Null -->|str| name
Null -->|str| value
Null -->|int| end_line
Null -->|int| col_start
Null -->|int| col_end_____
Null -->|int| pos_start
Null -->|int| pos_end_____

Null node type for Jac Ast.

Ellipsis#

flowchart LR
Ellipsis -->|Source| orig_src
Ellipsis -->|str| name
Ellipsis -->|str| value
Ellipsis -->|int| end_line
Ellipsis -->|int| col_start
Ellipsis -->|int| col_end_____
Ellipsis -->|int| pos_start
Ellipsis -->|int| pos_end_____

Ellipsis node type for Jac Ast.

Semi#

flowchart LR
Semi -->|Source| orig_src
Semi -->|str| name
Semi -->|str| value
Semi -->|int| end_line
Semi -->|int| col_start
Semi -->|int| col_end_____
Semi -->|int| pos_start
Semi -->|int| pos_end_____

Semicolon node type for Jac Ast.

CommentToken#

flowchart LR
CommentToken -->|Source| orig_src
CommentToken -->|str| name
CommentToken -->|str| value
CommentToken -->|int| end_line
CommentToken -->|int| col_start
CommentToken -->|int| col_end_____
CommentToken -->|int| pos_start
CommentToken -->|int| pos_end_____
CommentToken -->|bool| is_inline

CommentToken node type for Jac Ast.