This repository was archived by the owner on Oct 20, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ export function compile(tree: SyntaxTree): string {
67
67
} else if ( tree . argument1 . argument2 . content . lexeme == "number" ) {
68
68
type = "%d"
69
69
} else {
70
- throw ' Unsupported operation.'
70
+ throw ` Unsupported type ' ${ tree . argument1 . argument2 . content . lexeme } '.`
71
71
}
72
72
return `printf("${ type } ", ${ compile ( tree . argument1 ) } );\n`
73
73
}
Original file line number Diff line number Diff line change @@ -242,7 +242,7 @@ function checkConstantOperations(node: SyntaxTree) {
242
242
} else if ( node . argument1 . content . name == 'ASTERISK' ) {
243
243
result = value1 * value2
244
244
} else {
245
- throw ' Unsupported operation.'
245
+ throw ` Unsupported operation ' ${ node . argument1 . content . name } '.`
246
246
}
247
247
248
248
updated = true
@@ -263,7 +263,7 @@ function checkConstantOperations(node: SyntaxTree) {
263
263
}
264
264
/* String */
265
265
} else {
266
- throw ' Unsupported operation.'
266
+ throw ` Unsupported type ${ node . argument1 . argument1 . argument2 . content . lexeme } .`
267
267
}
268
268
}
269
269
}
@@ -285,7 +285,7 @@ function checkConstantOperations(node: SyntaxTree) {
285
285
} else if ( node . argument2 . content . name == 'ASTERISK' ) {
286
286
result = value1 * value2
287
287
} else {
288
- throw ' Unsupported operation.'
288
+ throw ` Unsupported operation ' ${ node . argument2 . content . name } '.`
289
289
}
290
290
291
291
updated = true
@@ -306,7 +306,7 @@ function checkConstantOperations(node: SyntaxTree) {
306
306
}
307
307
/* String */
308
308
} else {
309
- throw ' Unsupported operation.'
309
+ throw ` Unsupported type ' ${ node . argument2 . argument1 . argument2 . content . lexeme } '.`
310
310
}
311
311
}
312
312
}
You can’t perform that action at this time.
0 commit comments