be more specific with strings
This commit is contained in:
parent
703a680ff7
commit
fe15752d04
|
|
@ -1,3 +1,5 @@
|
||||||
|
pub type Ident = String;
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub enum Statement {
|
pub enum Statement {
|
||||||
Assign {
|
Assign {
|
||||||
|
|
@ -5,7 +7,7 @@ pub enum Statement {
|
||||||
source: Box<Expression>,
|
source: Box<Expression>,
|
||||||
},
|
},
|
||||||
Call {
|
Call {
|
||||||
callee: String,
|
callee: Ident,
|
||||||
args: Vec<Expression>,
|
args: Vec<Expression>,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
@ -13,7 +15,7 @@ pub enum Statement {
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub enum Location {
|
pub enum Location {
|
||||||
Variable {
|
Variable {
|
||||||
name: String,
|
name: Ident,
|
||||||
},
|
},
|
||||||
Field {
|
Field {
|
||||||
table: Box<Location>,
|
table: Box<Location>,
|
||||||
|
|
@ -26,7 +28,7 @@ pub enum Expression {
|
||||||
Constant(Constant),
|
Constant(Constant),
|
||||||
Variable(Location),
|
Variable(Location),
|
||||||
Call {
|
Call {
|
||||||
callee: String,
|
callee: Ident,
|
||||||
args: Vec<Expression>,
|
args: Vec<Expression>,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user