Soft Keywords (original) (raw)

Edit this page on GitHub

A soft modifier is one of the identifiers infix, inline, opaque, open and transparent.

A soft keyword is a soft modifier, or one of as, derives, end, extension, throws, using, |, +, -, *

A soft modifier is treated as potential modifier of a definition if it is followed by a hard modifier or a keyword combination starting a definition (def, val, var, type, given, class, trait, object, enum, case class, case object). Between the two words there may be a sequence of newline tokens and soft modifiers.

Otherwise, soft keywords are treated specially in the following situations:

Everywhere else a soft keyword is treated as a normal identifier.