@@ -24,8 +24,8 @@ public struct CST {
|
|||||||
public struct Categories {
|
public struct Categories {
|
||||||
public protocol LanguageElement {}
|
public protocol LanguageElement {}
|
||||||
public protocol Expression: Categories.LanguageElement {}
|
public protocol Expression: Categories.LanguageElement {}
|
||||||
public protocol Statement : Categories.LanguageElement {}
|
public protocol Statement: Categories.LanguageElement {}
|
||||||
public protocol State : Categories.LanguageElement {}
|
public protocol State: Categories.LanguageElement {}
|
||||||
public protocol Declaration: Categories.Statement {}
|
public protocol Declaration: Categories.Statement {}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,7 +45,8 @@ public struct CST {
|
|||||||
public var tipe: CST.Tipe
|
public var tipe: CST.Tipe
|
||||||
|
|
||||||
public init(
|
public init(
|
||||||
identifier: Identifier, withType tipe: CST.Tipe, withInitializer initializer: Categories.Expression?
|
identifier: Identifier, withType tipe: CST.Tipe,
|
||||||
|
withInitializer initializer: Categories.Expression?
|
||||||
) {
|
) {
|
||||||
self.identifier = identifier
|
self.identifier = identifier
|
||||||
self.initializer = initializer
|
self.initializer = initializer
|
||||||
@@ -227,7 +228,6 @@ public struct CST {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public struct Declaration {}
|
public struct Declaration {}
|
||||||
|
|
||||||
public struct Control: CustomStringConvertible, Categories.Declaration {
|
public struct Control: CustomStringConvertible, Categories.Declaration {
|
||||||
|
|||||||
@@ -68,7 +68,9 @@ public protocol CSTVisitor<T> {
|
|||||||
|
|
||||||
// Statements
|
// Statements
|
||||||
func visit(node: CST.Statements, driver: CSTVisitorDriver, context: T) -> Result<T>
|
func visit(node: CST.Statements, driver: CSTVisitorDriver, context: T) -> Result<T>
|
||||||
func visit(node: CST.VariableDeclarationStatement, driver: CSTVisitorDriver, context: T) -> Result<T>
|
func visit(
|
||||||
|
node: CST.VariableDeclarationStatement, driver: CSTVisitorDriver, context: T
|
||||||
|
) -> Result<T>
|
||||||
func visit(node: CST.ExpressionStatement, driver: CSTVisitorDriver, context: T) -> Result<T>
|
func visit(node: CST.ExpressionStatement, driver: CSTVisitorDriver, context: T) -> Result<T>
|
||||||
|
|
||||||
// Expressions
|
// Expressions
|
||||||
|
|||||||
Reference in New Issue
Block a user