setTypeId() public method

public setTypeId ( int t ) : void
t int
return void
Example #1
0
void dataType(Var e)
  {
  int id = tok.getId();
#if DEBUG
  Console.WriteLine("dataType1 token=["+tok+"]\n");
#endif
  e.setSign(Tok.T_SIGNED);
  if (id == Tok.T_SIGNED || id == Tok.T_UNSIGNED)
    {
    e.setSign(id);
    tok.scan();
    id = tok.getId();
#if DEBUG
    Console.WriteLine("dataType2 token=["+tok+"]\n");
#endif
    }
  if (id == Tok.T_VOID || id == Tok.T_INT)
    {
    e.setTypeId(id);
    tok.scan();
#if DEBUG
    Console.WriteLine("dataType3 token=["+tok+"]\n");
#endif
    }
  else if (id == Tok.T_LONG)
    Io.ICE("Unhandled type LONG");
  else if (id == Tok.T_CHAR)
    Io.ICE("Unhandled type CHAR");
  else if (id == Tok.T_FLOAT)
    Io.ICE("Unhandled type FLOAT");
  else if (id == Tok.T_DOUBLE)
    Io.ICE("Unhandled type DOUBLE");
  else
    e.setTypeId(Tok.T_DEFTYPE);
  }
        void dataType(Var e)
        {
            int id = tok.getId();

#if DEBUG
            Console.WriteLine("dataType1 token=[" + tok + "]\n");
#endif
            e.setSign(Tok.T_SIGNED);
            if (id == Tok.T_SIGNED || id == Tok.T_UNSIGNED)
            {
                e.setSign(id);
                tok.scan();
                id = tok.getId();
#if DEBUG
                Console.WriteLine("dataType2 token=[" + tok + "]\n");
#endif
            }
            if (id == Tok.T_VOID || id == Tok.T_INT)
            {
                e.setTypeId(id);
                tok.scan();
#if DEBUG
                Console.WriteLine("dataType3 token=[" + tok + "]\n");
#endif
            }
            else if (id == Tok.T_LONG)
            {
                Io.ICE("Unhandled type LONG");
            }
            else if (id == Tok.T_CHAR)
            {
                Io.ICE("Unhandled type CHAR");
            }
            else if (id == Tok.T_FLOAT)
            {
                Io.ICE("Unhandled type FLOAT");
            }
            else if (id == Tok.T_DOUBLE)
            {
                Io.ICE("Unhandled type DOUBLE");
            }
            else
            {
                e.setTypeId(Tok.T_DEFTYPE);
            }
        }