function sizeofPlugin() {
  return {
    semantics() {
      return {
        [Syntax.FunctionCall]: next => args => {
          const [sizeof, context] = args;

          if (sizeof.value !== 'sizeof') {
            return next(args);
          }

          const { scopes, userTypes, functions } = context;
          const [, target] = sizeof.params;
          const ref = scope_4(scopes, target.value);
          const { type = '' } = ref || {};
          const userType = userTypes[target.value] || userTypes[type];
          const func = functions[target.value];

          if (userType != null) {
            const metaSize = userType.meta[OBJECT_SIZE];
            invariant_1(metaSize, 'Object size information is missing');
            return _extends({}, sizeof, {
              value: metaSize,
              params: [],
              type: 'i32',
              Type: Syntax.Constant
            });
          }

          const node = ref || func;

          return _extends({}, sizeof, {
            value: sizes$1[String(node ? node.type : target.value)],
            type: 'i32',
            params: [],
            Type: Syntax.Constant
          });
        }
      };
    }
  };
}
Sizeof helper plugin. Maps size(<THING>) to a static i32 constant