Parsers

ammonite.compiler.Parsers$
See theParsers companion class
object Parsers extends Parsers

Attributes

Companion:
class
Graph
Supertypes
class Parsers
class Parser
class Object
trait Matchable
class Any
Self type
Parsers.type

Members list

Concise view

Value members

Inherited methods

def defaultHighlight(buffer: Vector[Char], comment: Attrs, `type`: Attrs, literal: Attrs, keyword: Attrs, notImplemented: Attrs, reset: Attrs): Vector[Char]

Attributes

Inherited from:
Parsers
def highlightIndices[T](buffer: Vector[Char], ruleColors: PartialFunction[String, T], endColor: T): Seq[(Int, T)]

Attributes

Inherited from:
Parsers
def importHooks(statement: String): (String, Seq[ImportTree])

Attributes

Inherited from:
Parsers
def isObjDef(code: String): Boolean

Attributes

Inherited from:
Parsers
final def parseImportHooks(source: CodeSource, stmts: Seq[String]): (Seq[String], Seq[ImportTree])

Attributes

Inherited from:
Parser
def parseImportHooksWithIndices(source: CodeSource, statements: Seq[(Int, String)]): (Seq[String], Seq[ImportTree])

Attributes

Inherited from:
Parsers
def scriptBlocksWithStartIndices(rawCode: String, fileName: String): Either[ScriptSplittingError, Seq[ScriptBlock]]

Attributes

Inherited from:
Parsers
def split(code: String, ignoreIncomplete: Boolean, fileName: String): Option[Either[String, Seq[String]]]

Attributes

Inherited from:
Parsers
def splitScript(rawCode: String, fileName: String): Either[String, IndexedSeq[(String, Seq[String])]]

Splits up a script file into its constituent blocks, each of which is a tuple of (leading-whitespace, statements). Leading whitespace is returned separately so we can later manipulate the statements e.g. by adding val res2 = without the whitespace getting in the way

Splits up a script file into its constituent blocks, each of which is a tuple of (leading-whitespace, statements). Leading whitespace is returned separately so we can later manipulate the statements e.g. by adding val res2 = without the whitespace getting in the way

Attributes

Inherited from:
Parsers