STLR
public struct STLR : Codable
Undocumented
-
String
See moreDeclaration
Swift
public struct String : Codable -
TerminalString
See moreDeclaration
Swift
public struct TerminalString : Codable -
CharacterSet
See moreDeclaration
Swift
public struct CharacterSet : Codable -
Undocumented
Declaration
Swift
public typealias CharacterRange = [TerminalString] -
Undocumented
See moreDeclaration
Swift
public enum Literal : Codable -
Annotation
See moreDeclaration
Swift
public struct Annotation : Codable -
Undocumented
Declaration
Swift
public typealias Annotations = [Annotation] -
Undocumented
See moreDeclaration
Swift
public enum Label : Codable -
Undocumented
See moreDeclaration
Swift
public enum Terminal : Codable -
Group
See moreDeclaration
Swift
public class Group : Codable -
Element
See moreDeclaration
Swift
public class Element : Codable -
Undocumented
Declaration
Swift
public typealias Choice = [Element] -
Undocumented
Declaration
Swift
public typealias Sequence = [Element] -
Undocumented
See moreDeclaration
Swift
public enum Expression : Codable -
Undocumented
See moreDeclaration
Swift
public enum TokenType : Codable -
Rule
See moreDeclaration
Swift
public struct Rule : Codable -
ModuleImport
See moreDeclaration
Swift
public struct ModuleImport : Codable -
Grammar
See moreDeclaration
Swift
public struct Grammar : Codable -
Undocumented
Declaration
Swift
public typealias Modules = [ModuleImport] -
Undocumented
Declaration
Swift
public typealias Rules = [Rule] -
Undocumented
Declaration
Swift
public let grammar: Grammar -
Parses the supplied string using the generated grammar into a new instance of the generated data structure
Declaration
Swift
public static func build(_ source: Swift.String) throws -> STLRParameters
sourceThe string to parse
Return Value
A new instance of the data-structure
-
Undocumented
Declaration
Swift
public static var grammar: OysterKit.Grammar { get }
-
Declaration
Swift
public var description: Swift.String { get }
-
Generates Swift code that uses OysterKit to implement the parsed grammar
Declaration
Swift
public func swift(in file: TextFile)Parameters
grammarThe name of the class that will be generated
platformThe target platform for the class (note this will be depricated in a subsequent release so it is no longer required)
colorsA dictionary of colors that can be used by syntax coloring engines
Return Value
A
Stringcontaining the Swift source ornilif an error occured.
-
Validates the AST throwing an exception if validation fails
Declaration
Swift
public func validate() throws
-
Registers a new optimizer. Optimizers are applied in the order they are registered
Declaration
Swift
public static func register(optimizer: STLROptimizer)Parameters
optimizerThe optimizer
-
Removes all registered optimizers
Declaration
Swift
public static func removeAllOptimizations()
STLR Structure Reference