CommandLineParser

dotty.tools.dotc.config.CommandLineParser

Split a line of text using shell conventions.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

class ParseException(msg: String) extends RuntimeException

Attributes

Supertypes
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def expandArg(arg: String): List[String]

Expands all arguments starting with @ to the contents of the file named like each argument.

Expands all arguments starting with @ to the contents of the file named like each argument.

Attributes

def tokenize(line: String, errorFn: String => Unit): List[String]

Split the line into tokens separated by whitespace.

Split the line into tokens separated by whitespace.

Single or double quotes can be embedded to preserve internal whitespace:

""" echo "hello, world!" """ => "echo" :: "hello, world!" :: Nil """ echo hello,' 'world! """ => "echo" :: "hello, world!" :: Nil """ echo \"hello, world!\" """ => "echo" :: ""hello," :: "world!"" :: Nil

The embedded quotes are stripped. Escaping backslash is not stripped.

Invoke errorFn with a descriptive message if an end quote is missing.

Attributes

def tokenize(line: String): List[String]