Stuff
This commit is contained in:
parent
4399f5bae9
commit
a58c4064f8
3 changed files with 44 additions and 41 deletions
24
spec.md
24
spec.md
|
@ -20,34 +20,34 @@
|
||||||
C : int x = a[0];
|
C : int x = a[0];
|
||||||
```
|
```
|
||||||
For vectors and strings, it's a shallow copy (data is the same) unless a `*`
|
For vectors and strings, it's a shallow copy (data is the same) unless a `*`
|
||||||
is specified before [arg]
|
is specified before `[arg]`
|
||||||
|
|
||||||
- Compiled to bytecode
|
- Compiled to bytecode
|
||||||
|
|
||||||
In this document :
|
In this document :
|
||||||
- <...> :
|
- `<...>` :
|
||||||
Mandatory argument
|
Mandatory argument
|
||||||
- [...] :
|
- `[...]` :
|
||||||
Optional argument
|
Optional argument
|
||||||
- | :
|
- `|` :
|
||||||
Or
|
Or
|
||||||
## Core types
|
## Core types
|
||||||
|
|
||||||
- null :
|
- `null`:
|
||||||
Represents a null value - always evaluates to false
|
Represents a null value - always evaluates to false
|
||||||
- int :
|
- `int`:
|
||||||
32 bit signed integer, evaluates to false if zero and true otherwise
|
32 bit signed integer, evaluates to false if zero and true otherwise
|
||||||
- fix :
|
- `fix`:
|
||||||
16:16 bit fixed point signed integer, same evaluation rules as ints
|
16:16 bit fixed point signed integer, same evaluation rules as ints
|
||||||
- float :
|
- `float`:
|
||||||
32bit IEEE floating point value, same evaluation as ints (within
|
32bit IEEE floating point value, same evaluation as ints (within
|
||||||
`FL_ESPILOǸ̀`)
|
`FL_ESPILOǸ̀`)
|
||||||
- str:
|
- `str`:
|
||||||
ASCII character string - always evaluates to false
|
ASCII character string - always evaluates to false
|
||||||
- fn:
|
- `fn`:
|
||||||
Function, function "variables" are inherently of type fn - handle with care !
|
Function, function "variables" are inherently of type fn - handle with care !
|
||||||
- vec :
|
- `vec`:
|
||||||
Vectors of any type,
|
Vectors of any type
|
||||||
|
|
||||||
## Core functions
|
## Core functions
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#define FL_EPSILON (1e-6f)
|
||||||
|
|
||||||
enum OpTypes {
|
enum OpTypes {
|
||||||
OP_add = 0,
|
OP_add = 0,
|
||||||
OP_sub = 1,
|
OP_sub = 1,
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
#include "byte_defs.h"
|
||||||
|
|
||||||
int main(){
|
int main(){
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue