Mercurial > repos > tabletprog
comparison cbackend.js @ 374:368fbc9ea51b
Fix use of struct keyword in LL dialect expressions
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 14 Aug 2015 23:07:34 -0700 |
parents | 6b5096b07dd5 |
children |
comparison
equal
deleted
inserted
replaced
373:a694ffa8d461 | 374:368fbc9ea51b |
---|---|
408 return '((' + args[0].toCLLExpr(vars) + ') ? (' + args[1].toCLLExpr(vars) + ') : (' + args[2].toCLLExpr(vars) + '))'; | 408 return '((' + args[0].toCLLExpr(vars) + ') ? (' + args[1].toCLLExpr(vars) + ') : (' + args[2].toCLLExpr(vars) + '))'; |
409 case 'while:do': | 409 case 'while:do': |
410 throw new Error('while:do not allowed in expression context in llMessage block'); | 410 throw new Error('while:do not allowed in expression context in llMessage block'); |
411 case 'addr_of': | 411 case 'addr_of': |
412 return '(&(' + args[0].toCLLExpr(vars) + '))'; | 412 return '(&(' + args[0].toCLLExpr(vars) + '))'; |
413 case 'struct': | |
414 return 'struct ' + args[0].toCTypeName(); | |
413 case 'sizeof': | 415 case 'sizeof': |
414 return 'sizeof(' + args[0].toCTypeName() + ')'; | 416 return 'sizeof(' + args[0].toCTypeName() + ')'; |
415 case 'get': | 417 case 'get': |
416 return args[0].toCLLExpr(vars) + '[' + args[1].toCLLExpr(vars) + ']'; | 418 return args[0].toCLLExpr(vars) + '[' + args[1].toCLLExpr(vars) + ']'; |
417 case 'set': | 419 case 'set': |