QuotedString class final

A string between quote and end (default: quote).

  • prefix is a pattern allowed before the quote, such as [rRbB]?.
  • escape starts an escape sequence (default \); null for none.
  • doubled treats a doubled quote as an escaped quote (SQL, Pascal, VB, CSV).
  • multiline lets the string span lines; otherwise it also ends at the end of the line, so an unclosed quote cannot swallow the file.
  • lastInRun closes on the last delimiter of a run of quote characters, as Scala and Kotlin """ strings do: """"x"""" holds "x".
  • rules adds rules inside, such as interpolation.
Inheritance

Constructors

QuotedString(String quote, {String? end, String? prefix, String? escape = r'\', bool doubled = false, bool multiline = false, bool lastInRun = false, List<Rule> rules = const [], String scope = Scopes.string})
Creates a string block.
const

Properties

doubled → bool
Whether a doubled closing quote is an escape.
final
end → String?
Closing quote, when different from quote.
final
escape → String?
Escape character, or null for none.
final
hashCode → int
The hash code for this object.
no setterinherited
lastInRun → bool
Whether the string closes on the last delimiter of a run of quotes.
final
multiline → bool
Whether the string may span lines.
final
prefix → String?
Pattern allowed immediately before the quote.
final
quote → String
Opening quote.
final
rules → List<Rule>
Extra rules inside the string.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scope → String
Scope of the string.
final

Methods

expand() → List<Rule>
The basic rules this block stands for. Called once per block.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited