gcsl syntax update #1315
srliao
started this conversation in
RFC / Upcoming
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Short documentation of discussions/thoughts re #1148
Variables
A variable is a storage for hold a value. Set of permissible values is determined by the variable's type. Certain variable type can have the value
nil
which has no type.Types
number
string
bool
map
fn
character
action
map
A map is an unordered group of elements of one type, called the element type, indexed by a set of unique keys of another type, called the key type. The value of an uninitialized map is nil
fn
A function type is the set of all functions with the same parameter and result types (the signature). Value of uninitialized variable of a function type is
nil
for example:
each of these is a distinct type
character
A character is a special type with the following special methods:
character.skill()
whereskill()
has typefn() action
character.burst()
whereburst()
has typefn() action
It is not possible to create new
character
saction
An action is a special type with the following special methods:
action.exec(p)
whereexec(p)
has typefn(map)
Beta Was this translation helpful? Give feedback.
All reactions