The open quote.
Optional options: { Optional acceptIf true (by default), unclosed string(\n or EOF for single line string, and EOF for multiline string)
will also be accepted and marked as options.unclosedError.
Optional close?: stringThe close quote. Equals to the open quote by default.
Optional escape?: booleanDefault: true.
Optional multiline?: booleanDefault: false.
Optional unclosedDefault: 'unclosed string'
Generated using TypeDoc
Match a string literal.
Escape (
\) will be handled correctly for quote, not for the string content, so you have to parse those escaped content by yourself.E.g.
stringLiteral('"')will match"abc\"def"and return"abc\"def".Set
multiline: trueto allow multiline string literals.