package mopsa
Install
Dune Dependency
Authors
Maintainers
Sources
md5=fdee20e988343751de440b4f6b67c0f4
sha512=f5cbf1328785d3f5ce40155dada2d95e5de5cce4f084ea30cfb04d1ab10cc9403a26cfb3fa55d0f9da72244482130fdb89c286a9aed0d640bba46b7c00e09500
doc/mopsa.mopsa_py_parser/Mopsa_py_parser/Cst/index.html
Module Mopsa_py_parser.Cst
Source
Copyright (c) 2017-2019 Aymeric Fromherz and The MOPSA Project
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The definition of the ast can be found at: https://docs.python.org/3/library/ast.html#abstract-grammar
and stmt_kind =
| FunctionDef of identifier * arguments * stmt list * expr list * expr option
| AsyncFunctionDef of identifier * arguments * stmt list * expr list * expr option
| ClassDef of identifier * expr list * keyword list * stmt list * expr list
| Return of expr option
| Delete of expr list
| Assign of expr list * expr
| AugAssign of expr * binop * expr
| AnnAssign of expr * expr * expr option
| For of expr * expr * stmt list * stmt list
| AsyncFor of expr * expr * stmt list * stmt list
| While of expr * stmt list * stmt list
| If of expr * stmt list * stmt list
| With of withitem list * stmt list
| AsyncWith of withitem list * stmt list
| Raise of expr option * expr option
| Try of stmt list * excepthandler list * stmt list * stmt list
| Assert of expr * expr option
| Import of alias list
| ImportFrom of identifier option * alias list * int option
| Global of identifier list
| Nonlocal of identifier list
| Expr of expr
| Pass
| Break
| Continue
and expr_kind =
| BoolOp of boolop * expr list
| BinOp of expr * binop * expr
| UnaryOp of unop * expr
| Lambda of arguments * expr
| IfExp of expr * expr * expr
| Dict of expr list * expr list
| Set of expr list
| ListComp of expr * comprehension list
| SetComp of expr * comprehension list
| DictComp of expr * expr * comprehension list
| GeneratorExp of expr * comprehension list
| Await of expr
| Yield of expr option
| YieldFrom of expr
| Compare of expr * cmpop list * expr list
| Call of expr * expr list * keyword list
| Num of number
| Str of string
| FormattedValue of expr * int option * expr option
| JoinedStr of expr list
| Bytes of string
| NameConstant of singleton
| Ellipsis
| Attribute of expr * identifier * expr_context
| Subscript of expr * slice * expr_context
| Starred of expr * expr_context
| Name of identifier * expr_context
| List of expr list * expr_context
| Tuple of expr list * expr_context
| Null