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); }
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); }
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); } } }
private string ParseSimpleType(ExpressParser.SimpleTypeContext context) { return(generator.ParseType(context)); }