Element
public class Element : Codable
Element
-
Undocumented
Declaration
Swift
public let group: Group?
-
Undocumented
Declaration
Swift
public let lookahead: Swift.String?
-
Undocumented
Declaration
Swift
public let terminal: Terminal?
-
Undocumented
Declaration
Swift
public let identifier: Swift.String?
-
Undocumented
Declaration
Swift
public let void: Swift.String?
-
Undocumented
Declaration
Swift
public let quantifier: Quantifier?
-
Undocumented
Declaration
Swift
public let transient: Swift.String?
-
Undocumented
Declaration
Swift
public let negated: Swift.String?
-
Undocumented
Declaration
Swift
public let annotations: Annotations?
-
Default initializer
Declaration
Swift
public init(annotations: Annotations?, group: Group?, identifier: Swift.String?, lookahead: Swift.String?, negated: Swift.String?, quantifier: Quantifier?, terminal: Terminal?, transient: Swift.String?, void: Swift.String?)
-
Declaration
Swift
public var description: String { get }
-
The annotations defined as
RuleAnnotations
Declaration
Swift
public var ruleAnnotations: RuleAnnotations { get }
-
True if the element is skipping
Declaration
Swift
public var isVoid: Bool { get }
-
True if it is a scanning element
Declaration
Swift
public var isTransient: Bool { get }
-
True if the element is lookahead
Declaration
Swift
public var isLookahead: Bool { get }
-
True if the element is negated
Declaration
Swift
public var isNegated: Bool { get }
-
Returns the token name (if any) of the element
Declaration
Swift
public var token: TokenType? { get }
-
The
Kind
of the ruleDeclaration
Swift
public var kind: Behaviour.Kind { get }
-
The
Cardinality
of the matchDeclaration
Swift
public var cardinality: Cardinality { get }
-
The
Behaviour
of the ruleDeclaration
Swift
public var behaviour: Behaviour { get }
-
Determines if the
Element
directly references the supplied identifier (references it at a point where it is possible the scan head has not moved.Declaration
Parameters
identifier
The identifier that may be referenced
grammar
The grammar both the identifier and this element is in
Return Value
true
if the identifier could be referenced before the scan head has moved -
Determines if the
Element
references the supplied identifier (that is the identifier appears in the element or some part of an expression that forms the element.Parameters
identifier
The identifier that may be referenced
grammar
The grammar both the identifier and this element is in
Return Value
true
if the identifier is referenced -
Undocumented
Declaration
Swift
func expression(for tokenName: String, in grammar: STLR.Grammar) throws -> STLR.Expression