New Expression

A new expression creates an instance of the given class.

Structure

ParamList = '(' ( Expression ( ',' Expression )* )? ')'
NewExpr = 'new' VarLoc GenericArgs? ParamList

Example

new Table()
new Desk('oak')
new furniture.Bed('soft', 2)
new furniture.chairs.WoodenChair()
new furniture.chairs.Chair<Wood>()

References