class Ven::Parselet::PString

Overview

Parses a string into a QString: "foo bar baz\n".

Defined in:

ven/parselet/nud.cr

Constant Summary

SEQUENCES = {"\\n" => "\n", "\\t" => "\t", "\\r" => "\r", "\\\"" => "\"", "\\\\" => "\\"}

A hash of escaped escape sequences and what they should evaluate to.

Instance Method Summary

Instance methods inherited from class Ven::Parselet::Nud

parse(parser : Reader, tag : QTag, token : Token) parse, semicolon? : Bool semicolon?

Instance Method Detail

def parse(parser, tag, token) #

[View source]
def unescape(operand : String) #

Evaluates the escape sequences in the operand String.


[View source]