@@ -6,7 +6,7 @@ use crate::{bytecode::commands::{core::{ListGeneratorCommand, StackPusherCommand
66
77use super :: { command_map:: { CommandMap } , lexer:: { CommandToken , Token } } ;
88
9- pub struct CompileTime {
9+ pub struct Scope {
1010 pub command_map : CommandMap ,
1111 list_opener : Arc < DescribedCommand > , // StackPusherCommand{value_to_push: Value::OpenListIdentifier}
1212 list_generator : Arc < DescribedCommand > ,
@@ -16,7 +16,7 @@ pub struct CompileTime {
1616pub enum CompilationException {
1717 UnexcpectedEndToken ( String ) ,
1818 FunctionTokenRequired ,
19- CommandNotFound ( char ) ,
19+ CommandNotFound ( String ) ,
2020 AliasNotFound ( String ) ,
2121}
2222
@@ -28,7 +28,7 @@ impl ToString for CompilationException {
2828 CompilationException :: AliasNotFound ( alias) =>
2929 format ! ( "Alias {alias} not found" ) ,
3030 CompilationException :: CommandNotFound ( cmd) =>
31- format ! ( "Command {cmd} not found" ) ,
31+ format ! ( "Command ' {cmd}' not found" ) ,
3232 CompilationException :: FunctionTokenRequired =>
3333 format ! ( "Function token required" ) ,
3434 CompilationException :: UnexcpectedEndToken ( t) =>
@@ -37,9 +37,9 @@ impl ToString for CompilationException {
3737 }
3838}
3939
40- impl CompileTime {
40+ impl Scope {
4141 pub fn new ( ) -> Self {
42- CompileTime {
42+ Scope {
4343 command_map : CommandMap :: new ( ) ,
4444
4545 list_opener : Arc :: new ( DescribedCommand {
@@ -118,7 +118,7 @@ impl CompileTime {
118118
119119 CommandToken :: CommandOrAlias ( alias) =>
120120 self . command_map . get ( & alias)
121- . ok_or ( CompilationException :: CommandNotFound ( '0' ) ) ?,
121+ . ok_or ( CompilationException :: CommandNotFound ( alias . clone ( ) ) ) ?,
122122
123123 CommandToken :: ListOpenBracket =>
124124 self . list_opener . clone ( ) ,
0 commit comments