These are chat archives for ChaiScript/ChaiScript
@lefticus I have implemented function cascading for defining objects in chaiscript for my ECS. Currently I need to define my objects like this in chaiscript:
This looks ugly and confusing for many components. Is it somehow possible to write it like this:
factory.defineObject("Diamond") .addComp_TouchValue() .addComp_TouchDamage() .addComp_Position()
As far as I understood it correctly chaiscript stops evaluating an expression at a line break which unfortunately forbids the upper formatting.
;at the end of a statement makes it difficult to tell where to start and stop
Is there maybe a possibility to define a particular character that tells the parser to append the next line to the current one or to continue the expression, e.g. :
factory.defineObject("Diamond") \ .addComp_TouchValue() \ .addComp_TouchDamage() \ .addComp_Position()
It's similar to macro definitions over multiple lines.