Before

1package mill.api.daemon.internal
2
3import scala.util.DynamicVariable
4
5trait MillScalaParser {
6 def splitScript(
7 rawCode: String,
8 fileName: String
9 ): Either[String, (String, Seq[String], Seq[String])]
10
11 /* not sure if this is the right way, in case needs change, or if we should accept some
12 * "generic" visitor over some "generic" trees?
13 */
14 def parseObjectData(rawCode: String): Seq[MillScalaParser.ObjectData]
15}
…lines 16–43 unchanged (28 lines)

After

1package mill.api.daemon.internal
2
3import scala.util.DynamicVariable
4
5trait MillScalaParser {
6 def splitScript(
7 rawCode: String,
8 fileName: String,
9 colored: Boolean
10 ): Either[String, (String, Seq[String], Seq[String])]
11
12 /* not sure if this is the right way, in case needs change, or if we should accept some
13 * "generic" visitor over some "generic" trees?
14 */
15 def parseObjectData(rawCode: String): Seq[MillScalaParser.ObjectData]
…lines 16–44 unchanged (29 lines)

Before

compilation_unit
package_clause
package "package"
package_identifier
identifier "mill"
. "."
identifier "api"
. "."
identifier "daemon"
. "."
identifier "internal"
import_declaration
import "import"
identifier "scala"
. "."
identifier "util"
. "."
identifier "DynamicVariable"
trait_definition
trait "trait"
identifier "MillScalaParser"
template_body
{ "{"
function_declaration
def "def"
identifier "splitScript"
parameters
( "("
parameter
identifier "rawCode"
: ":"
type_identifier "String"
, ","
parameter
identifier "fileName"
: ":"
type_identifier "String"
) ")"
: ":"
generic_type (+25 nodes collapsed)
block_comment
/* "/*"
*/ " */"
function_declaration
def "def"
identifier "parseObjectData"
parameters
( "("
parameter
identifier "rawCode"
: ":"
type_identifier "String"
) ")"
: ":"
generic_type
type_identifier "Seq"
type_arguments
[ "["
stable_type_identifier
identifier "MillScalaParser"
. "."
type_identifier "ObjectData"
] "]"
} "}"
object_definition (+145 nodes collapsed)

After

compilation_unit
package_clause
package "package"
package_identifier
identifier "mill"
. "."
identifier "api"
. "."
identifier "daemon"
. "."
identifier "internal"
import_declaration
import "import"
identifier "scala"
. "."
identifier "util"
. "."
identifier "DynamicVariable"
trait_definition
trait "trait"
identifier "MillScalaParser"
template_body
{ "{"
function_declaration
def "def"
identifier "splitScript"
parameters
( "("
parameter
identifier "rawCode"
: ":"
type_identifier "String"
, ","
parameter
identifier "fileName"
: ":"
type_identifier "String"
, ","
parameter
identifier "colored"
: ":"
type_identifier "Boolean"
) ")"
: ":"
generic_type (+25 nodes collapsed)
block_comment
/* "/*"
*/ " */"
function_declaration
def "def"
identifier "parseObjectData"
parameters
( "("
parameter
identifier "rawCode"
: ":"
type_identifier "String"
) ")"
: ":"
generic_type
type_identifier "Seq"
type_arguments
[ "["
stable_type_identifier
identifier "MillScalaParser"
. "."
type_identifier "ObjectData"
] "]"
} "}"
object_definition (+145 nodes collapsed)