File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -288,9 +288,9 @@ local Table = {
288
288
__tostring = function (self )
289
289
local paired = ' ' ;
290
290
for k , v in pairs (self ) do
291
- paired = paired .. tostring (k ) .. ' ' .. tostring (v ) .. ' , ' ;
291
+ paired = paired .. tostring (k ) .. ' ' .. tostring (v ) .. ' ' ;
292
292
end
293
- return ' { ' .. paired .. ' }' ;
293
+ return ' { ' .. paired .. ' }' ;
294
294
end ,
295
295
__concat = strcat
296
296
}
@@ -387,6 +387,8 @@ function charon.object_new(proto)
387
387
end
388
388
389
389
function charon .object_get (object , key )
390
+ assert (object ~= nil , " Cannot get '" .. tostring (key ) .. " ' from nothing!" );
391
+ assert (object ~= charon .Unit , " Cannot get '" .. tostring (key ) .. " ' from unit!" );
390
392
local field = object [key ];
391
393
if field == nil then return charon .Unit ; end
392
394
return field ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " charon" ,
3
- "version" : " 0.8.0 " ,
3
+ "version" : " 0.8.1 " ,
4
4
"preview" : true ,
5
5
"description" : " Charon language compiler" ,
6
6
"main" : " dist/index.js" ,
Original file line number Diff line number Diff line change @@ -220,7 +220,7 @@ Please do not hesitate to provide additional steps for reproduction.
220
220
case '#let' :
221
221
return this . genLet ( invoke ) ;
222
222
case '#three-dots' :
223
- return `charon.vector {...}` ;
223
+ return `charon.list {...}` ;
224
224
case '#if' : {
225
225
const condition = this . genTerm ( args [ 0 ] ) ;
226
226
const then = this . genTerm ( args [ 1 ] ) ;
@@ -698,7 +698,7 @@ Please do not hesitate to provide additional steps for reproduction.
698
698
}
699
699
700
700
private genVector ( vector : ast . Vector ) : string {
701
- return `charon.vector { ${ vector . list . map ( this . genTerm . bind ( this ) ) . join ( ) } }`
701
+ return `charon.list { ${ vector . list . map ( this . genTerm . bind ( this ) ) . join ( ) } }`
702
702
}
703
703
704
704
private genSymbol ( symbol : ast . SYMBOL ) : string {
You can’t perform that action at this time.
0 commit comments