🌽 MILHO Docs
Expressions
Expressions are the base unit of the milho language, and there are some types an expression can be.
-
Symbol
The symbol type is simple defined as a sequence of characters that doesn't starts with
(,),',;,-, doesn't starts with a digit, is not the wordTrue, not the wordFalse, and doesn't have a white-space.So, things like
Menes,mene,mene-123,Number.MAX_INTare valid symbols.And things like
-mene,;mksmk,123.menearen't valid symbols. -
Number
The number is a (single or a sequence) of digits that might be preceded by a
-to indicate a negative number and may have a/between the digits when representing a fraction.So
-1,2,1/2are valid numbers.And
1.2and23-2aren't, we don't have floating point numbers, don't ask why. -
String
Strings are expressions that starts with a
"and hopefully ends with one too. We can have white-spaces but no new lines, but we might escape it with a \n and other escape sequences."helo","nice string \n you have there"are valid.123"mene"andmene"123"aren't, but be careful, the last example IS a valid symbol.