(Prototype) Generate the frontend AST when traversing the Python one #3038
Labels
c++
C++ engineering related
discussion
Welcome discussion!
experimental
The feature is experimental, no grantee
feature request
Suggest an idea on this project
python
Python engineering related
Projects
Concisely describe the proposed feature
Right now Taichi generates its C++ AST in the following steps:
Describe the solution you'd like (if any)
Build the C++ AST directly while traversing the Python AST.
AST Node Implementation Progress
Based on https://docs.python.org/3.9/library/ast.html#abstract-grammar
mod
InteractiveExpressionFunctionTypestmt
FunctionDef
AsyncFunctionDefClassDefReturn
DeleteAssign
AugAssign
AnnAssignFor
AsyncForWhile
If
WithAsyncWithRaiseTryAssert
ImportImportFromGlobalNonlocalExpr
Pass
Break
Continue
expr
BoolOp
NamedExpr
BinOp
UnaryOp
LambdaIfExp
Dict
SetListComp
SetCompDictComp
GeneratorExpAwaitYieldYieldFromCompare
(left op[0] comparators[0]) and (comparators[0] op[1] comparators[1]) and ...
Call
FormattedValueJoinedStr
Constant
Attribute
Subscript
Starred
Name
List
Tuple
Sliceother
The text was updated successfully, but these errors were encountered: