Method in macro · Expr compiler

Expr::string

pub fn string() -> Option<string>
Import
use macro::{Expr};
Source: compiler/src/prelude/macro.hy

The value of a string constant, escapes decoded: for "a\"b", a"b.

Called on a Expr value as value.string(…).

Returns#

Option<string>

See also#

  • Expr: A function-style macro argument as written: f(1), a + b, "text".
  • Expr::str: The source text as written.
  • Expr::src: The source to splice: parenthesized unless it is a single term, so ${a} * 2 keeps a whole.
  • Expr::kind
  • Expr::is_literal
  • Expr::is_ident
  • Expr::int: The argument’s value when it is an integer constant: 3, -2, 2 * 21.
  • Expr::float: The value of a float constant (2.5, -1.0e3), or of an integer one.
↑ ↓ navigate ↵ open