Make Formatter Happy

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
Will Hawkins
2026-04-20 05:54:00 -04:00
parent d33066c543
commit 883b4127e8
9 changed files with 50 additions and 33 deletions
+4 -3
View File
@@ -363,8 +363,9 @@ func ContainsInvalidStatements(
return false
}
func ContainsInvalidStatements(block: BlockStatement, invalids: [EvaluatableStatement.Type]) -> Bool {
return block.statements.contains() { statement in
func ContainsInvalidStatements(block: BlockStatement, invalids: [EvaluatableStatement.Type]) -> Bool
{
return block.statements.contains { statement in
for es in invalids {
if type(of: statement) == es {
return true
@@ -372,4 +373,4 @@ func ContainsInvalidStatements(block: BlockStatement, invalids: [EvaluatableStat
}
return false
}
}
}
+4 -2
View File
@@ -492,7 +492,7 @@ extension Control: CompilableDeclaration {
apply = (apply_statement as! ApplyStatement)
// The apply is the last thing in a control declaration.
break;
break
} else {
return .Error(
ErrorOnNode(node: currentChild, withError: "Uknown node type in control declaration"))
@@ -603,7 +603,9 @@ extension Action: Compilable {
return .Ok(
(
Action(named: action_name, withParameters: action_parameters, withBody: (action_body as! BlockStatement)),
Action(
named: action_name, withParameters: action_parameters,
withBody: (action_body as! BlockStatement)),
current_context
))
}
+4 -3
View File
@@ -247,8 +247,8 @@ extension ExpressionStatement: CompilableStatement {
let expression_node = node.child(at: 0)!
return switch Expression.Compile(node: expression_node, withContext: context) {
case .Ok(let expression): .Ok((ExpressionStatement(expression), context))
case .Error(let e): .Error(e)
case .Ok(let expression): .Ok((ExpressionStatement(expression), context))
case .Error(let e): .Error(e)
}
}
}
@@ -340,7 +340,8 @@ extension ApplyStatement: CompilableStatement {
let expression_node = node.child(at: 1)!
return switch BlockStatement.Compile(node: expression_node, withContext: context) {
case .Ok((let statement, let updated_context)): .Ok((ApplyStatement(statement as! BlockStatement), updated_context))
case .Ok((let statement, let updated_context)):
.Ok((ApplyStatement(statement as! BlockStatement), updated_context))
case .Error(let e): .Error(e)
}
}