README.adoc: updated draft
This commit is contained in:
parent
8f396a35de
commit
95605232ab
25
README.adoc
25
README.adoc
@ -135,6 +135,9 @@ func main() {
|
||||
}
|
||||
----
|
||||
|
||||
=== Concepts and terminology
|
||||
#TODO#
|
||||
|
||||
=== Data types
|
||||
_Expr_ supports numerical, string, relational, boolean expressions, and mixed-type lists.
|
||||
|
||||
@ -260,7 +263,15 @@ _Expr_ supports list of mixed-type values, also specified by normal expressions.
|
||||
|===
|
||||
|
||||
=== Variables
|
||||
#TODO: variables#
|
||||
A variable is an identifier with an assigned value. Variables are stored in the object that implements the _ExprContext_ interface.
|
||||
|
||||
.Examples
|
||||
[source,go]
|
||||
----
|
||||
a=1
|
||||
x = 5.2 * (9-3)
|
||||
x = 1; y = 2*x
|
||||
----
|
||||
|
||||
=== Other operations
|
||||
|
||||
@ -346,12 +357,15 @@ The table below shows all supported operators by decreasing priorities.
|
||||
.2+|*AND*| [blue]`and` | _Infix_ | _and_ | _boolean_ "and" _boolean_ -> _boolean_
|
||||
| [blue]`&&` | _Infix_ | _and_ | _boolean_ "&&" _boolean_ -> _boolean_
|
||||
.2+|*OR*| [blue]`or` | _Infix_ | _or_ | _boolean_ "or" _boolean_ -> _boolean_
|
||||
| [blue]`||` | _Infix_ | _or_ | _boolean_ "||" _boolean_ -> _boolean_
|
||||
| [blue]`\|\|` | _Infix_ | _or_ | _boolean_ "\|\|" _boolean_ -> _boolean_
|
||||
.1+|*ASSIGN*| [blue]`=` | _Infix_ | _assignment_ | _identifier_ "=" _any_ -> _any_
|
||||
.1+|*BUT*| [blue]`but` | _Infix_ | _but_ | _any_ "but" _any_ -> _any_
|
||||
|===
|
||||
|
||||
=== Functions
|
||||
Functions in _Expr_ are very similar to functions in many programming languages.
|
||||
|
||||
In _Expr_ functions compute values in a local context (scope) that do not make effects on the calling context. This is the normal behavior. Using the reference operator [blue]`@` it is possibile to export local definition to the calling context.
|
||||
|
||||
==== Function calls
|
||||
#TODO: function calls operations#
|
||||
@ -359,8 +373,13 @@ The table below shows all supported operators by decreasing priorities.
|
||||
==== Function definitions
|
||||
#TODO: function definitions operations#
|
||||
|
||||
==== Builtins
|
||||
=== Builtins
|
||||
#TODO: builtins#
|
||||
|
||||
==== Builtin functions
|
||||
|
||||
==== [blue]_import()_
|
||||
[blue]_import([grey]#<source-file>#)_ loads the multi-expression contained in the specified source and returns its value.
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user