nitc :: AAnnotation :: arg_as_int
self
as an Int
.Raise error and return null on any inconsistency.
# Get the single argument of `self` as an `Int`.
# Raise error and return null on any inconsistency.
fun arg_as_int(modelbuilder: ModelBuilder): nullable Int
do
var args = n_args
if args.length == 1 then
var arg = args.first.as_int
if arg != null then return arg
end
modelbuilder.error(self, "Syntax Error: `{name}` expects a single Int as argument.")
return null
end
src/annotation.nit:54,2--66,4