Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- open System
- type Name = string
- type VarName = Name
- type MemberName = Name
- type LabelName = Name
- type Arg = Type * VarName
- type Value = obj
- type EnumValue = Name * Value
- type Import =
- | Import of Name
- | Abbreviation of Name * Name
- type Access = Public | Private | Protected | Internal
- type Modifier = Sealed | Static
- type Expr =
- | Literal of Value
- | Variable of VarName
- | MethodInvoke of MemberName * Expr list
- | PropertyGet of MemberName
- | InfixOperator of Expr * string * Expr
- | PrefixOperator of string * Expr
- | PostfixOperator of Expr * string
- | TernaryOperator of Expr * Expr * Expr
- type From = Type * Name * Expr
- type To = Expr
- type Step = Expr list
- type Statement =
- | Define of Type * VarName
- | Assignment of VarName * Expr
- | PropertySet of MemberName * Expr
- | If of Expr * Block
- | Else of Expr * Block
- | Switch of Expr * Case list
- | For of From * To * Step * Block
- | ForEach of Type * VarName * Expr
- | While of Expr * Statement list
- | DoWhile of Statement List * Expr
- | Try of Statement list
- | Catch of Type * Block
- | Finally of Type * Block
- | Lock of Expr * Block
- | Using of Expr * Block
- | Label of LabelName
- | Goto of LabelName
- | Break
- | Continue
- | Return of Expr
- and Case = Case of Value option * Block
- and Block = Statement list
- type MemberInfo = Access * Modifier option * Type * Name
- type Member =
- | Field of MemberInfo * Expr option
- | Method of MemberInfo * Arg list * Block
- | Property of MemberInfo * Block
- type CSharpType =
- | Class of Access * Modifier option * Name * Member list
- | Struct of Access * Name * Member list
- | Enum of Access * Type * EnumValue list
- type Scope =
- | Namespace of Import list * Name * Scope list
- | Types of Import list * CSharpType list
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement