attr_index
fn attr_index(Vec<Attr> attrs, string name) -> int Import
Source: use macro::{attr_index}; compiler/src/prelude/macro.hy Index of the attribute called name, or -1.
Parameters#
| Name | Type |
|---|---|
attrs | Vec<Attr> |
name | string |
Returns#
int
See also#
join: Join fragments withsep(the lowering of$(xs) sep *).lit: A string literal:lit("a\"b")splices as"a\"b".lit_int: An integer literal.raw: Raw source, spliced as is.concat: Combine several generated item lists.ident: A name, for splicing generated identifiers:${ident("to_" + n)}.decimal: A decimal integer the compiler wrote (-then digits, in range).attr_value:#[attr(key = "value")]from an attribute list, orfallback.