Safe Haskell | None |
---|---|
Language | Haskell2010 |
MOO command parsing and execution
- data Command = Command {}
- parseWords :: Text -> [StrT]
- parseCommand :: Text -> Command
- runCommand :: Command -> MOO Value
Data Structures
A structure describing a player's parsed command
Command | |
|
Parsing Typed Commands
parseWords :: Text -> [StrT] Source
Split a typed command into words according to the MOO rules for quoting and escaping.
parseCommand :: Text -> Command Source
Return a Command
value describing the arguments of a typed command as
parsed into verb, preposition, direct and indirect object, etc.
Executing MOO Code
runCommand :: Command -> MOO Value Source
Execute a typed command by locating and calling an appropriate MOO verb
for the current player, matching dobj
and iobj
objects against the
strings in the typed command.