Mercurial > python-compiler.rs
comparison src/python_ast.rs @ 69:a73eaf42bea1
Add ast.AsyncDefFunction.
| author | Bastien Orivel <eijebong@bananium.fr> |
|---|---|
| date | Mon, 13 Jun 2016 17:54:19 +0200 |
| parents | c59ad5ccd8a6 |
| children | 2c1e2ce41263 |
comparison
equal
deleted
inserted
replaced
| 68:c59ad5ccd8a6 | 69:a73eaf42bea1 |
|---|---|
| 7 } | 7 } |
| 8 | 8 |
| 9 #[derive(Clone, Debug, PartialEq, Eq, Hash)] | 9 #[derive(Clone, Debug, PartialEq, Eq, Hash)] |
| 10 pub enum stmt { | 10 pub enum stmt { |
| 11 // FunctionDef(identifier name, arguments args, stmt* body, expr* decorator_list, expr? returns) | 11 // FunctionDef(identifier name, arguments args, stmt* body, expr* decorator_list, expr? returns) |
| 12 FunctionDef(String, arguments, Vec<stmt>, Vec<expr>, Option<expr>), | |
| 13 | |
| 14 // AsyncFunctionDef(identifier name, arguments args, stmt* body, expr* decorator_list, expr? returns) | 12 // AsyncFunctionDef(identifier name, arguments args, stmt* body, expr* decorator_list, expr? returns) |
| 15 //AsyncFunctionDef(String/*, arguments, Vec<expr>), | 13 // If the last field is true, then it's an AsyncFunctionDef. |
| 14 FunctionDef(String, arguments, Vec<stmt>, Vec<expr>, Option<expr>, bool), | |
| 16 | 15 |
| 17 // ClassDef(identifier name, expr* bases, keyword* keywords, stmt* body, expr* decorator_list) | 16 // ClassDef(identifier name, expr* bases, keyword* keywords, stmt* body, expr* decorator_list) |
| 18 ClassDef(String, Vec<expr>, Vec<keyword>, Vec<stmt>, Vec<expr>), | 17 ClassDef(String, Vec<expr>, Vec<keyword>, Vec<stmt>, Vec<expr>), |
| 19 | 18 |
| 20 // Return(expr? value) | 19 // Return(expr? value) |
