Appearance
| 1 | @@IF.dotnet() | |
| 2 | ||
| 3 | namespace Semantic.DotNet is | |
| 4 | // The operation name, such as "arithmetic.add", that a reflected | |
| 5 | // member's INTRINSIC_ATTRIBUTE carries. | |
| 6 | class INTRINSIC_OPERATION is | |
| 7 | of(attributes: Collections.Iterable[System.Reflection.CustomAttributeData]) -> string? static is | |
| 8 | try | |
| 9 | for attr in attributes do | |
| 10 | if attr.attribute_type.full_name =~ "Ghul.Internal.INTRINSIC_ATTRIBUTE" then | |
| 11 | for argument in attr.constructor_arguments do | |
| 12 | return cast string?(argument.value) | |
| 13 | od | |
| 14 | fi | |
| 15 | od | |
| 16 | catch ex: System.Exception | |
| 17 | yrt | |
| 18 | ||
| 19 | return null | |
| 20 | si | |
| 21 | si | |
| 22 | si |