Skip to content
This repository was archived by the owner on Oct 17, 2021. It is now read-only.

Operator_Kind

mattt edited this page Feb 7, 2020 · 6 revisions

Operator.Kind

The kind of operator (prefix, infix, or postfix).

public enum Kind

Inheritance

Codable, Hashable, String

Enumeration Cases

postfix

A unary operator that comes after its operand.

case postfix

prefix

A unary operator that comes before its operand.

case prefix

infix

An binary operator that comes between its operands.

case infix

Initializers

init?(_:)

init?(_ modifiers: [Modifier])

init(_:)

Creates an instance initialized with the given syntax node.

public init(_ node: OperatorDeclSyntax)

Properties

name

The operator name.

let name: String

modifiers

The declaration modifiers.

let modifiers: [Modifier]

context

let context: String?

attributes

The declaration attributes.

let attributes: [Attribute]

keyword

The declaration keyword ("operator").

let keyword: String

kind

The kind of operator (prefix, infix, or postfix).

var kind: Kind

Methods

isValidIdentifier(_:)

static func isValidIdentifier(_ string: String) -> Bool

Clone this wiki locally