|
|
|
|
@ -399,6 +399,9 @@ Class definitions with parameters
|
|
|
|
|
|
|
|
|
|
class Point(val x: Int, val y: Int)(implicit coord: Coord)
|
|
|
|
|
|
|
|
|
|
// TODO: The last argument should become class_parameters
|
|
|
|
|
class A @Inject()(x: Int, y: Int)
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
(compilation_unit
|
|
|
|
|
@ -408,7 +411,16 @@ class Point(val x: Int, val y: Int)(implicit coord: Coord)
|
|
|
|
|
(class_parameter (identifier) (type_identifier))
|
|
|
|
|
(class_parameter (identifier) (type_identifier)))
|
|
|
|
|
(class_parameters
|
|
|
|
|
(class_parameter (identifier) (type_identifier)))))
|
|
|
|
|
(class_parameter (identifier) (type_identifier))))
|
|
|
|
|
(comment)
|
|
|
|
|
(class_definition
|
|
|
|
|
(identifier)
|
|
|
|
|
(annotation
|
|
|
|
|
(type_identifier)
|
|
|
|
|
(arguments)
|
|
|
|
|
(arguments
|
|
|
|
|
(ascription_expression (identifier) (type_identifier))
|
|
|
|
|
(ascription_expression (identifier) (type_identifier))))))
|
|
|
|
|
|
|
|
|
|
=======================================
|
|
|
|
|
Class definitions with parameters (Scala 3 syntax)
|
|
|
|
|
@ -416,6 +428,15 @@ Class definitions with parameters (Scala 3 syntax)
|
|
|
|
|
|
|
|
|
|
class Point(val x: Int, val y: Int)(using coord: Coord)
|
|
|
|
|
|
|
|
|
|
// TODO: The last argument should become class_parameters
|
|
|
|
|
class A @ann (x: Int, y: Int)
|
|
|
|
|
|
|
|
|
|
// TODO: The last argument should become class_parameters
|
|
|
|
|
class A @ann(1) (x: Int, y: Int)
|
|
|
|
|
|
|
|
|
|
// TODO: The last argument should become class_parameters
|
|
|
|
|
class A @ann(1)(1) (x: Int, y: Int)
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
(compilation_unit
|
|
|
|
|
@ -425,7 +446,35 @@ class Point(val x: Int, val y: Int)(using coord: Coord)
|
|
|
|
|
(class_parameter (identifier) (type_identifier))
|
|
|
|
|
(class_parameter (identifier) (type_identifier)))
|
|
|
|
|
(class_parameters
|
|
|
|
|
(class_parameter (identifier) (type_identifier)))))
|
|
|
|
|
(class_parameter (identifier) (type_identifier))))
|
|
|
|
|
(comment)
|
|
|
|
|
(class_definition
|
|
|
|
|
(identifier)
|
|
|
|
|
(annotation
|
|
|
|
|
(type_identifier)
|
|
|
|
|
(arguments
|
|
|
|
|
(ascription_expression (identifier) (type_identifier))
|
|
|
|
|
(ascription_expression (identifier) (type_identifier)))))
|
|
|
|
|
(comment)
|
|
|
|
|
(class_definition
|
|
|
|
|
(identifier)
|
|
|
|
|
(annotation
|
|
|
|
|
(type_identifier)
|
|
|
|
|
(arguments (integer_literal))
|
|
|
|
|
(arguments
|
|
|
|
|
(ascription_expression (identifier) (type_identifier))
|
|
|
|
|
(ascription_expression (identifier) (type_identifier)))))
|
|
|
|
|
(comment)
|
|
|
|
|
(class_definition
|
|
|
|
|
(identifier)
|
|
|
|
|
(annotation
|
|
|
|
|
(type_identifier)
|
|
|
|
|
(arguments (integer_literal))
|
|
|
|
|
(arguments (integer_literal))
|
|
|
|
|
(arguments
|
|
|
|
|
(ascription_expression (identifier) (type_identifier))
|
|
|
|
|
(ascription_expression (identifier) (type_identifier)))))
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
=======================================
|
|
|
|
|
Modifiers
|
|
|
|
|
|