class RakuAST::StrLiteral { }

The RakuAST::StrLiteral class represents a literal string (such as `"foo"`).

Object introspection§

RakuAST::StrLiteral objects are typically created when parsing Raku Programming Language code. So most developers will only need to know how to introspect the objects created.

These introspection methods are available (in alphabetical order):

value§

say $literal.value;

The value method returns the value it is representing.

Object creation§

There is one way to create a RakuAST::StrLiteral object directly (rather than having RakuAST::Literal.from-value figure it out):

new§

my $literal = RakuAST::StrLiteral.new("foo");
say $literal.^name;  # RakuAST::StrLiteral

Creates a RakuAST::StrLiteral object from the given value. Assumes the value is really a string, does not do any sanity checks.