1234567891011module juptune.asn1.lang.operations;
Result asn1AreObjectIdentifiersEqual(
IdIrA,
IdIrB
)(
IdIrA objIdA,
IdIrB objIdB,
bool areEqual,
Asn1ErrorHandler errors
);
Determines if the two IR nodes are valid OBJECT IDENTIFIER values, and are functionally equal to eachother.
Because there's a variety of nodes that can be used as a valid OBJECT IDENTIFIER value, there's no singular location that feels best to place this logic, hence why it exists in this specific module.
While this function does attempt to perform compile time checks to ensure IdIrA and IdIrB are valid types for this function; there are some checks that can only occur at runtime for otherwise valid IR types, hence why things like typeMismatchcan be thrown.
Asn1ValueSequenceIr- when there is only 1 value of type INTEGER: { 1 }, { myInt }
Asn1ObjectIdentifierSequenceIr- any form is supported.
ulong[]is also accepted to massively simplify programatic comparisons.
ast2ir should also cover most cases where it's ambiguous whether a named value list or object id sequence is used, so Asn1NamedValueSequenceIris unsupported in this function.
Asn1SemanticError.typeMismatchif either objIdAor objIdBcannot represent a valid OBJECT IDENTIFIER value.
Asn1SemanticError.typeMismatchif either objIdAor objIdBcontain a subvalue that is not of type INTEGER.
A Resultindicating if some type of error occurred, unrelated to whether the values area equal or not.