Beoran 2f5cbd7491 Ponder design of fields more. | 4 tahun lalu | |
---|---|---|
cmd | 4 tahun lalu | |
test | 5 tahun lalu | |
LICENSE | 4 tahun lalu | |
README.md | 4 tahun lalu | |
alias.go | 4 tahun lalu | |
ast.go | 4 tahun lalu | |
ast_test.go | 5 tahun lalu | |
block.go | 4 tahun lalu | |
bool.go | 4 tahun lalu | |
builtin.go | 4 tahun lalu | |
callable.go | 4 tahun lalu | |
console.go | 4 tahun lalu | |
cover.go | 4 tahun lalu | |
defined.go | 4 tahun lalu | |
design_muesli.muesli | 4 tahun lalu | |
doc.go | 6 tahun lalu | |
door.go | 4 tahun lalu | |
empty.go | 4 tahun lalu | |
error.go | 4 tahun lalu | |
float.go | 4 tahun lalu | |
frame.go | 4 tahun lalu | |
go.mod | 5 tahun lalu | |
go.sum | 5 tahun lalu | |
help.go | 4 tahun lalu | |
int.go | 4 tahun lalu | |
keyword.go | 4 tahun lalu | |
lexer.go | 4 tahun lalu | |
lexer_test.go | 5 tahun lalu | |
list.go | 4 tahun lalu | |
logger.go | 4 tahun lalu | |
map.go | 4 tahun lalu | |
muesli.go | 6 tahun lalu | |
object.go | 4 tahun lalu | |
parser.go | 4 tahun lalu | |
parser_test.go | 4 tahun lalu | |
redispatch.go | 4 tahun lalu | |
scope.go | 4 tahun lalu | |
signature.go | 4 tahun lalu | |
string.go | 4 tahun lalu | |
token.go | 4 tahun lalu | |
type.go | 4 tahun lalu | |
value.go | 4 tahun lalu | |
vm.go | 4 tahun lalu | |
vm_test.go | 5 tahun lalu | |
word.go | 4 tahun lalu |
Muesli is a scripting language implemented in Go, that has a simple command chain based TCL or shell like syntax but with rich semantics. Unlike TCL or shels, all muelsi values are typed, and many types are supported, not just string values. Additionaly, if so desired, every symbol used in the syntax can be replaced by a key word, leading to a native language programming feel.
A Muesli program consists of blocks and chains, separated by newlines or periods. A chain consists of one or more commands, linked together by operators.
Blocks consist of chains grouped together in blocks between braces {}. The commands in a block are not executed immediately but stored.
A single chain can be placed in parenthesis (), where the return value of the chain will be subsituted. Lists are formed by placing their contents between brackets [].
Every command has a return value, which can be of any type, and not just a number like in most shells. Furthermore commands have input and output, which default to stdin and stdout, but can be redirected or reconfigured.
There are three types of commands, namely direct commands, substitutions, and literal commands. A direct command starts with a name, and is followed by any number of parameters. Parameters may be which may be blocks, parenthesis, lists, names or literals, or values. An indirect command starts with a substitution followed by parameters. A literal command is simply a numeric, string, boolean or nil literal that evaluates to itself.
The language itself has no control statements, such as if, or for, these are implemented as commands in stead.
Muesly supports several kinds of values, namely: