Snippet

object Snippet
Companion:
class
trait Product
trait Mirror
class Object
trait Matchable
class Any
Snippet.type

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from:
Mirror

Value members

Concrete methods

def defaultMultilineMarkdownQuotes: String => String
def defaultSingleLineQuotes: String => String
def emptyPrompt: String => String
def githubMultilineMarkdownQuotes: String => String
def greaterThanPrompt: String => String
def markdownCode(multilineQuotes: String => String, singleLineQuotes: String => String, offset: Int): (String, String) => String

display a cut piece of code as markdown depending on the existence of newlines in the original piece

display a cut piece of code as markdown depending on the existence of newlines in the original piece

def simplePrompt(p: String): String => String
def trimApproximatedSnippet: String => String

trim the expression from start and end accolades if it is a multiline expression

trim the expression from start and end accolades if it is a multiline expression

  • in some case it is necessary to add a dummy expression so that the range position of the captured snippet is correct. //;1// is the smallest such expression
def trimRangePosSnippet: String => String

RangePos snippets are built by using all the string at the macro application point (it used to be only the "inside" code but that got broken in 2.11.0-M8)

RangePos snippets are built by using all the string at the macro application point (it used to be only the "inside" code but that got broken in 2.11.0-M8)

3 things need to be trimmed:

  • the "snippet" method call

  • the expression from start and end accolades if it is a multiline expression

  • in some case it is necessary to add a dummy expression so that the range position of the captured snippet is correct. //;1// is the smallest such expression

Concrete fields

lazy val ls: String
lazy val parameters: String
lazy val scissorsMarker: String
lazy val scissorsMarkerFormat: String