Skip to content

Latest commit

 

History

History
18 lines (17 loc) · 431 Bytes

类型系统设计.md

File metadata and controls

18 lines (17 loc) · 431 Bytes

基本类型 primaryType 1.Bool {name:"Bool",kind:PrimaryType.Bool} 2.String {name:"String",kind:PrimaryType.String} 3.Number {name:"Number",kind:PrimaryType.Number} 4.Array {}

复合类型 compositeType type Type { (field:Type (,|;)? )+ } 类型别名 type Type = Type 枚举类型 enum Type { ( Id( (() Type ()) )? )+ } 类型语法 Type: Id(genericType)? 泛型语法 genericType: ( (<) Id1 ( (,) IdN )* (>) )?