File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ pub struct NewList {
9494}
9595
9696impl NewList {
97- pub fn new ( thing : & mut Vec < LiteralOrFile > ) -> Self {
97+ pub fn new ( mut thing : Vec < LiteralOrFile > ) -> Self {
9898 Self {
9999 car : LitOrList :: Literal ( thing. remove ( 0 ) ) ,
100100 cdr : LitOrList :: Literal ( thing. remove ( 0 ) ) ,
@@ -225,8 +225,8 @@ impl Scope {
225225 // and also less typing instead of creating a NewIdentifierType you just pass in a vector of LiteralType
226226 let new_val: NewIdentifierType = match value. len ( ) {
227227 0 => error ( line, "expected Identifier, got empty list" ) ,
228- 1 => NewIdentifierType :: Vairable ( Box :: new ( NewVairable :: new ( value. remove ( 0 ) ) ) ) ,
229- 2 => NewIdentifierType :: List ( Box :: new ( NewList :: new ( value) ) ) ,
228+ 1 => NewIdentifierType :: Vairable ( Box :: new ( NewVairable :: new ( value. clone ( ) . remove ( 0 ) ) ) ) ,
229+ 2 => NewIdentifierType :: List ( Box :: new ( NewList :: new ( value. clone ( ) ) ) ) ,
230230 _ => error (
231231 line,
232232 "expected Identifier, got list with more than 2 elements" ,
Original file line number Diff line number Diff line change @@ -415,7 +415,7 @@ impl TokenType {
415415 }
416416 }
417417 } else {
418- error:: error ( line, "Unknown keyword" ) ;
418+ error:: error ( line, format ! ( "Unknown keyword, {}" , self ) ) ;
419419 }
420420 }
421421}
You can’t perform that action at this time.
0 commit comments