+ # Get the single argument of `self` as an `Int`. Raise error on any inconsistency.
+ private fun arg_as_int(modelbuilder: ModelBuilder): nullable Int
+ do
+ var annotation_name = n_atid.n_id.text
+ var format_error = "Annotation error: \"{annotation_name}\" expects a single Int as argument."
+
+ var args = n_args
+ var platform_name
+ if args.length != 1 then
+ modelbuilder.error(self, format_error)
+ return null
+ else
+ var arg = args.first
+
+ if not arg isa AExprAtArg then
+ modelbuilder.error(self, format_error)
+ return null
+ end
+
+ var expr = arg.n_expr
+ if not expr isa AIntExpr then
+ modelbuilder.error(self, format_error)
+ return null
+ end
+ return expr.value.as(not null)
+ end
+ end
+