Method: ArrayType#check

Defined in:
lib/tecsgen/core/types.rb

#checkObject

意味的誤りがあれば、文字列を返す



1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
# File 'lib/tecsgen/core/types.rb', line 1259

def check # 意味的誤りがあれば、文字列を返す
  if @type.class == FuncType # 関数の配列
    return "array of function"
  elsif @type.class == ArrayType # 添数なし配列の配列
    unless @type.get_subscript
      return "subscript not specified"
    end
  end

  return @type.check # 配列要素の型をチェック
end