-
Notifications
You must be signed in to change notification settings - Fork 30
PrecedenceGroup_Relation
The relation of operators to operators in other precedence groups, which determines the order in which operators of different precedence groups are evaluated in absence of parentheses.
public enum Relation
Consider the expression a ⧓ b ⧗ c
.
If the ⧓
operator has a higher precedence than ⧗
,
then the expression is interpreted as (a ⧓ b) ⧗ c
.
If the ⧓
operator has a lower precedence than ⧗
,
then the expression is interpreted as a ⧓ (b ⧗ c)
.
For example,
Swift mathematical operators have the same inherent precedence
as their corresponding arithmetic operations,
such that 1 + 2 * 3
evaluates to 7
(1 + (2 * 3)
)
rather than 9
((1 + 2) * 3
).
Hashable
, Codable
, Comparable
- PrecedenceGroup.Relation.CodingKeys
The precedence group has higher precedence than the associated group names.
case higherThan(: [String])
The precedence group has lower precedence than the associated group names.
case lowerThan(: [String])
case higherThan
case lowerThan
Creates an instance initialized with the given syntax node.
public init?(_ node: PrecedenceGroupRelationSyntax)
public init(from decoder: Decoder) throws
public func encode(to encoder: Encoder) throws
public static func <(lhs: PrecedenceGroup.Relation, rhs: PrecedenceGroup.Relation) -> Bool
Generated at 2020-08-02T12:14:07+0000 using swift-doc 1.0.0-beta.3.
Types
- AssociatedType
- Attribute
- Attribute.Argument
- Class
- ConditionalCompilationBlock
- ConditionalCompilationBlock.Branch
- DeclarationCollector
- Deinitializer
- Enumeration
- Enumeration.Case
- Extension
- Function
- Function.Parameter
- Function.Signature
- GenericParameter
- GenericRequirement
- GenericRequirement.Relation
- Import
- Initializer
- Modifier
- Operator
- Operator.Kind
- PrecedenceGroup
- PrecedenceGroup.Associativity
- PrecedenceGroup.Relation
- Protocol
- Structure
- Subscript
- Typealias
- Variable
- Variable.Accessor
- Variable.Accessor.Kind