Make Formatter Happy

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
Will Hawkins
2026-02-24 00:44:04 -05:00
parent b4c5ce55e1
commit 5dbb8d3d60
16 changed files with 280 additions and 269 deletions
+8 -5
View File
@@ -28,7 +28,8 @@ protocol ParseableEvaluatableExpression {
extension TypedIdentifier: ParseableEvaluatableExpression {
static func parse(
node: SwiftTreeSitter.Node, inTree tree: SwiftTreeSitter.MutableTree, withScopes scopes: LexicalScopes
node: SwiftTreeSitter.Node, inTree tree: SwiftTreeSitter.MutableTree,
withScopes scopes: LexicalScopes
) -> Result<EvaluatableExpression?> {
guard
@@ -61,7 +62,8 @@ extension TypedIdentifier: ParseableEvaluatableExpression {
extension P4BooleanValue: ParseableEvaluatableExpression {
static func parse(
node: SwiftTreeSitter.Node, inTree tree: SwiftTreeSitter.MutableTree, withScopes scopes: LexicalScopes
node: SwiftTreeSitter.Node, inTree tree: SwiftTreeSitter.MutableTree,
withScopes scopes: LexicalScopes
) -> Result<EvaluatableExpression?> {
guard
@@ -101,7 +103,8 @@ extension P4BooleanValue: ParseableEvaluatableExpression {
extension P4IntValue: ParseableEvaluatableExpression {
static func parse(
node: SwiftTreeSitter.Node, inTree tree: SwiftTreeSitter.MutableTree, withScopes scopes: LexicalScopes
node: SwiftTreeSitter.Node, inTree tree: SwiftTreeSitter.MutableTree,
withScopes scopes: LexicalScopes
) -> Result<EvaluatableExpression?> {
guard
@@ -132,7 +135,8 @@ extension P4IntValue: ParseableEvaluatableExpression {
extension P4StringValue: ParseableEvaluatableExpression {
static func parse(
node: SwiftTreeSitter.Node, inTree tree: SwiftTreeSitter.MutableTree, withScopes scopes: LexicalScopes
node: SwiftTreeSitter.Node, inTree tree: SwiftTreeSitter.MutableTree,
withScopes scopes: LexicalScopes
) -> Result<EvaluatableExpression?> {
guard
@@ -202,4 +206,3 @@ extension ExpressionStatement: ParseableStatement {
return Result.Ok((.none, scopes))
}
}
+1 -1
View File
@@ -18,4 +18,4 @@
import Common
public typealias LexicalScope = Scope<P4Type>
public typealias LexicalScopes = Scopes<P4Type>
public typealias LexicalScopes = Scopes<P4Type>
+4 -2
View File
@@ -70,8 +70,10 @@ extension VariableDeclarationStatement: ParseableStatement {
if rvalue.type().eq(rhs: declaration_p4_type) {
return Result.Ok(
(
VariableDeclarationStatement(identifier: Identifier(name: variable_name), withInitializer: rvalue),
scopes.declare(identifier: Identifier(name: variable_name), withValue: declaration_p4_type)
VariableDeclarationStatement(
identifier: Identifier(name: variable_name), withInitializer: rvalue),
scopes.declare(
identifier: Identifier(name: variable_name), withValue: declaration_p4_type)
))
} else {
+1 -1
View File
@@ -51,4 +51,4 @@ public struct Types {
}
return Result.Error(Error(withMessage: "Type name not recognized"))
}
}
}