From fe15752d040f5bb9212fca4ab46c2fb9bd0499eb Mon Sep 17 00:00:00 2001 From: numzero Date: Sat, 19 Apr 2025 10:42:16 +0300 Subject: [PATCH] be more specific with strings --- src/ast.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ast.rs b/src/ast.rs index 3933d84..940cc64 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -1,3 +1,5 @@ +pub type Ident = String; + #[derive(Debug, Clone)] pub enum Statement { Assign { @@ -5,7 +7,7 @@ pub enum Statement { source: Box, }, Call { - callee: String, + callee: Ident, args: Vec, }, } @@ -13,7 +15,7 @@ pub enum Statement { #[derive(Debug, Clone)] pub enum Location { Variable { - name: String, + name: Ident, }, Field { table: Box, @@ -26,7 +28,7 @@ pub enum Expression { Constant(Constant), Variable(Location), Call { - callee: String, + callee: Ident, args: Vec, }, }