Exemplo n.º 1
0
        public string ParseSimpleType(ExpressParser.SimpleTypeContext context)
        {
            var type = string.Empty;

            if (context.binaryType() != null)
            {
                type = "Uint8Array";
            }
            else if (context.booleanType() != null)
            {
                type = "boolean";
            }
            else if (context.integerType() != null)
            {
                type = "number";
            }
            else if (context.logicalType() != null)
            {
                type = "boolean";
            }
            else if (context.numberType() != null)
            {
                type = "number";
            }
            else if (context.realType() != null)
            {
                type = "number";
            }
            else if (context.stringType() != null)
            {
                type = "string";
            }
            return(type);
        }
Exemplo n.º 2
0
        public string ParseSimpleType(ExpressParser.SimpleTypeContext context)
        {
            var type = string.Empty;

            if (context.binaryType() != null)
            {
                type = "byte[]";
            }
            else if (context.booleanType() != null)
            {
                type = "bool";
            }
            else if (context.integerType() != null)
            {
                type = "int";
            }
            else if (context.logicalType() != null)
            {
                type = "bool?";
            }
            else if (context.numberType() != null)
            {
                type = "double";
            }
            else if (context.realType() != null)
            {
                type = "double";
            }
            else if (context.stringType() != null)
            {
                type = "string";
            }
            return(type);
        }
Exemplo n.º 3
0
 public override void ExitSimpleType(ExpressParser.SimpleTypeContext context)
 {
     if (currTypeData is SimpleType)
     {
         ((SimpleType)currTypeData).WrappedType = ParseSimpleType(context);
     }
     else if (currTypeData is Entity)
     {
         foreach (var ad in currAttrDatas)
         {
             ad.Type = ParseSimpleType(context);
         }
     }
 }
Exemplo n.º 4
0
 private string ParseSimpleType(ExpressParser.SimpleTypeContext context)
 {
     return(generator.ParseType(context));
 }