documentation: Update Note Protocol
Using /// rather than simply //. Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
@@ -611,7 +611,7 @@ public class P4ArrayValue: P4DataValue {
|
||||
}
|
||||
|
||||
public func set(index: Int, to: P4Value) -> Result<P4ArrayValue> {
|
||||
// TODO: Check for OOB
|
||||
/// TODO: Check for OOB
|
||||
var updated_values = self.value
|
||||
updated_values[index] = to
|
||||
return Result.Ok(P4ArrayValue(withType: self.vtype, withValue: updated_values))
|
||||
@@ -621,7 +621,7 @@ public class P4ArrayValue: P4DataValue {
|
||||
guard rhs as? P4ArrayValue != nil else {
|
||||
return false
|
||||
}
|
||||
// TODO!!
|
||||
/// TODO
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -629,7 +629,7 @@ public class P4ArrayValue: P4DataValue {
|
||||
guard rhs as? P4ArrayValue != nil else {
|
||||
return false
|
||||
}
|
||||
// TODO!!
|
||||
/// TODO
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -637,7 +637,7 @@ public class P4ArrayValue: P4DataValue {
|
||||
guard rhs as? P4ArrayValue != nil else {
|
||||
return false
|
||||
}
|
||||
// TODO!!
|
||||
/// TODO
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -645,7 +645,7 @@ public class P4ArrayValue: P4DataValue {
|
||||
guard rhs as? P4ArrayValue != nil else {
|
||||
return false
|
||||
}
|
||||
// TODO!!
|
||||
/// TODO
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -653,7 +653,7 @@ public class P4ArrayValue: P4DataValue {
|
||||
guard rhs as? P4ArrayValue != nil else {
|
||||
return false
|
||||
}
|
||||
// TODO!!
|
||||
/// TODO
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@ public struct P4Value: CustomStringConvertible {
|
||||
}
|
||||
|
||||
public func update(withNewValue value: P4DataValue) -> Result<P4Value> {
|
||||
// TODO: Check that the types match.
|
||||
/// TODO: Check that the types match.
|
||||
return .Ok(P4Value(value, self._type))
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ extension Declaration: CompilableDeclaration {
|
||||
let declaration_compilers: [String: CompilableDeclaration.Type] = [
|
||||
"function_declaration": FunctionDeclaration.self,
|
||||
"control_declaration": Control.self,
|
||||
"type_declaration": P4Struct.self, // ASSUME: Type declarations are struct declarations.
|
||||
"type_declaration": P4Struct.self, /// ASSUME: Type declarations are struct declarations.
|
||||
"extern_declaration": ExternDeclaration.self,
|
||||
]
|
||||
|
||||
@@ -273,7 +273,7 @@ extension P4Lang.Parser: CompilableDeclaration {
|
||||
let type_node = current_node
|
||||
var parser_name: Common.Identifier? = .none
|
||||
|
||||
// TODO: Handle parser parameter lists.
|
||||
/// TODO: Handle parser parameter lists.
|
||||
var parameter_list = ParameterList()
|
||||
|
||||
do {
|
||||
|
||||
@@ -352,7 +352,7 @@ extension BinaryOperatorExpression: CompilableExpression {
|
||||
ErrorOnNode(
|
||||
node: node, withError: "Malformed binary operator expression")))
|
||||
|
||||
// TODO: This macro cannot handle new lines in the arrays
|
||||
/// TODO: This macro cannot handle new lines in the arrays
|
||||
// swift-format-ignore
|
||||
#RequireNodesType<Node, EvaluatableExpression?>(
|
||||
nodes: binary_operator_expression_node,
|
||||
|
||||
@@ -275,7 +275,7 @@ public struct Parser {
|
||||
var error: Error? = .none
|
||||
|
||||
var current_context = context
|
||||
// TODO: Assert that there is only one.
|
||||
/// TODO: Assert that there is only one.
|
||||
node.enumerateNamedChildren { parser_state in
|
||||
if parser_state.nodeType != "parserState" {
|
||||
return
|
||||
|
||||
@@ -44,7 +44,7 @@ public struct Declaration: P4DataType {
|
||||
}
|
||||
|
||||
public func def() -> any Common.P4DataValue {
|
||||
// TODO: Is a default of the extern'd type the right way to go?
|
||||
/// TODO: Is a default of the extern'd type the right way to go?
|
||||
return self.identifier.type.dataType().def()
|
||||
}
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ public struct FunctionCall {
|
||||
public init(_ callee: P4FFI, withArguments arguments: ArgumentList) {
|
||||
self.callee = (.none, callee)
|
||||
self.arguments = arguments
|
||||
// ASSUME: That the FFI has been checked and the type is always a function declaration.
|
||||
/// ASSUME: That the FFI has been checked and the type is always a function declaration.
|
||||
self.return_type = (callee.type().dataType() as! FunctionDeclaration).tipe.dataType()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -367,7 +367,7 @@ extension FieldAccessExpression: EvaluatableExpression {
|
||||
return (.Error(Error(withMessage: "\(strct) does not identify a struct")), updated_execution)
|
||||
}
|
||||
|
||||
// TODO: Create a default value?
|
||||
/// TODO: Create a default value?
|
||||
guard let value = struct_strct.get(field: self.field) else {
|
||||
return (.Error(Error(withMessage: "Missing value")), updated_execution)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user