123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- (**
- This module contains the basic operators used in the QSP syntax.
- *)
- type 'a literal = Text of string | Expression of 'a
- let map_litteral : f:('a -> 'b) -> 'a literal -> 'b literal =
- fun ~f -> function Text t -> Text t | Expression e -> Expression (f e)
- type boperator =
- | Eq
- | Neq
- | Plus
- | Minus
- | Product
- | Div
- | Gt
- | Lt
- | Gte
- | Lte
- | And
- | Or
- | Mod
- [@@deriving eq, show]
- and uoperator = No | Neg | Add [@@deriving eq, show]
- and assignation_operator =
- | Eq'
- | Inc (** += *)
- | Decr (** -= *)
- | Mult
- | Div_assign
- [@@deriving eq, show]
- type function_ =
- | Arrcomp
- | Arrpos
- | Arrsize
- | Countobj
- | Desc
- | Desc'
- | Dyneval
- | Dyneval'
- | Func
- | Func'
- | Getobj
- | Getobj'
- | Iif
- | Iif'
- | Input
- | Input'
- | Instr
- | Isnum
- | Isplay
- | Lcase
- | Lcase'
- | Len
- | Loc
- | Max
- | Max'
- | Mid
- | Mid'
- | Min
- | Min'
- | Msecscount
- | Rand
- | Replace
- | Replace'
- | Rgb
- | Rnd
- | Selact
- | Str
- | Str'
- | Strcomp
- | Strfind
- | Strfind'
- | Strpos
- | Trim
- | Trim'
- | Ucase
- | Ucase'
- | Val
- [@@deriving eq, show]
- type keywords =
- | IncLib
- | Addobj
- | Cla
- | Clear
- | Clear'
- | Close
- | CloseAll
- | Cls
- | CmdClear
- | CopyArr
- | DelAct
- | FreeLib
- | DelObj
- | Dynamic
- | Exec
- | Exit
- | Gosub
- | Goto
- | Jump
- | KillAll
- | KillObj
- | KillVar
- | MainTxt
- | MainTxt'
- | Menu
- | Msg
- | Nl
- | Nl'
- | P
- | P'
- | Pl
- | Pl'
- | Play
- | OpenGame
- | OpenQst
- | RefInt
- | SaveGame
- | SetTimer
- | ShowActs
- | ShowInput
- | ShowObjs
- | ShowStat
- | Stattxt
- | Stattxt'
- | Unselect
- | View
- | Wait
- | XGoto
- [@@deriving eq, show]
|