package mopsa
Install
Dune Dependency
Authors
Maintainers
Sources
md5=9f673f79708b44a7effb3b6bb3618d2c
sha512=cb91cb428e43a22f1abbcb8219710d0c10a5b3756d0da392d4084b3b3a6157350776c596983e63def344f617d39964e91f244f60c07958695ee5c8c809a9f0f4
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