Beispiel #1
0
    public static NeuOperation Execute(
        this NeuInterpreter interpreter,
        NeuSimpleTypeId simpleTypeId)
    {
        var id = simpleTypeId.GetIdentifer();

        if (id == null)
        {
            throw new Exception();
        }

        ///

        switch (id.Source)
        {
        case "Float":

            return(new NeuInteger(4));

        ///

        case "Int":

            return(new NeuInteger(4));

        ///

        case "Bool":

            return(new NeuInteger(1));

        ///

        default:

            throw new Exception();
        }
    }
Beispiel #2
0
 public static NeuIdentifier?GetIdentifer(
     this NeuSimpleTypeId simpleTypeId)
 {
     return(simpleTypeId.GetFirstOrDefault <NeuIdentifier>());
 }