Mercurial > python-compiler.rs
comparison src/python_ast.rs @ 2:5fc7c2790d8c
Add class support.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 31 May 2016 02:31:55 +0100 |
parents | b90e49ab734b |
children | 326d7f2a94d4 |
comparison
equal
deleted
inserted
replaced
1:b90e49ab734b | 2:5fc7c2790d8c |
---|---|
4 pub statements: Vec<Statement>, | 4 pub statements: Vec<Statement>, |
5 } | 5 } |
6 | 6 |
7 #[derive(Clone, Debug)] | 7 #[derive(Clone, Debug)] |
8 pub enum Statement { | 8 pub enum Statement { |
9 ClassDef(String, Vec<Expr>, Vec<Statement>), | |
9 FunctionDef(Expr, Vec<Expr>, Vec<Statement>), | 10 FunctionDef(Expr, Vec<Expr>, Vec<Statement>), |
10 Global(Vec<String>), | 11 Global(Vec<String>), |
11 If(Expr, Vec<Statement>, Vec<Statement>), | 12 If(Expr, Vec<Statement>, Vec<Statement>), |
12 Assign(Vec<Expr>, Expr), | 13 Assign(Vec<Expr>, Expr), |
13 Return(Expr), | 14 Return(Expr), |