Source/NFX.Erlang/ErlInputStream.cs
/// <summary>
/// Read arbitraty Erlang term from the stream
/// </summary>
Read arbitraty Erlang term from the stream
Read arbitraty Erlang term from the stream
public IErlObject Read()
      {
        checkSpace(1);
        switch ((ErlExternalTag)m_Buffer[m_Position])
        {
          case ErlExternalTag.SmallAtom:
          case ErlExternalTag.SmallAtomUtf8:
          case ErlExternalTag.Atom:
          case ErlExternalTag.AtomUtf8:
            return ReadAtomOrBool();
          case ErlExternalTag.Bin:
            return ReadBinary();
          case ErlExternalTag.SmallInt:
          case ErlExternalTag.Int:
          case ErlExternalTag.SmallBigInt:
          case ErlExternalTag.LargeBigInt:
            return ReadByteOrLong();
          case ErlExternalTag.String:
            return ReadString();
          case ErlExternalTag.Float:
          case ErlExternalTag.NewFloat:
            return ReadDouble();
          case ErlExternalTag.List:
          case ErlExternalTag.Nil:
            return ReadList();
          case ErlExternalTag.SmallTuple:
          case ErlExternalTag.LargeTuple:
            return ReadTuple();
          case ErlExternalTag.Ref:
          case ErlExternalTag.NewRef:
            return ReadRef();
          case ErlExternalTag.Port:
            return ReadPort();
          case ErlExternalTag.Pid:
            return ReadPid();
          case ErlExternalTag.Map:
            return ReadMap();
          default:
            throw new ErlException(
                StringConsts.ERL_UNSUPPORTED_TERM_TYPE_ERROR,
                    m_Buffer[m_Position]);
        }
      }
public IErlObject Read ( ) { checkSpace ( 1 ) ; switch ( ( ErlExternalTag ) m_Buffer [ m_Position ] ) { case ErlExternalTag . SmallAtom : case ErlExternalTag . SmallAtomUtf8 : case ErlExternalTag . Atom : case ErlExternalTag . AtomUtf8 : return ReadAtomOrBool ( ) ; case ErlExternalTag . Bin : return ReadBinary ( ) ; case ErlExternalTag . SmallInt : case ErlExternalTag . Int : case ErlExternalTag . SmallBigInt : case ErlExternalTag . LargeBigInt : return ReadByteOrLong ( ) ; case ErlExternalTag . String : return ReadString ( ) ; case ErlExternalTag . Float : case ErlExternalTag . NewFloat : return ReadDouble ( ) ; case ErlExternalTag . List : case ErlExternalTag . Nil : return ReadList ( ) ; case ErlExternalTag . SmallTuple : case ErlExternalTag . LargeTuple : return ReadTuple ( ) ; case ErlExternalTag . Ref : case ErlExternalTag . NewRef : return ReadRef ( ) ; case ErlExternalTag . Port : return ReadPort ( ) ; case ErlExternalTag . Pid : return ReadPid ( ) ; case ErlExternalTag . Map : return ReadMap ( ) ; default : throw new ErlException ( StringConsts . ERL_UNSUPPORTED_TERM_TYPE_ERROR , m_Buffer [ m_Position ] ) ; } }
Read arbitraty Erlang term from the stream
Read arbitraty Erlang term from the stream