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];
|
||||
```
|
||||
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
|
||||
|
||||
In this document :
|
||||
- <...> :
|
||||
- `<...>` :
|
||||
Mandatory argument
|
||||
- [...] :
|
||||
- `[...]` :
|
||||
Optional argument
|
||||
- | :
|
||||
- `|` :
|
||||
Or
|
||||
## Core types
|
||||
|
||||
- null :
|
||||
- `null`:
|
||||
Represents a null value - always evaluates to false
|
||||
- int :
|
||||
- `int`:
|
||||
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
|
||||
- float :
|
||||
- `float`:
|
||||
32bit IEEE floating point value, same evaluation as ints (within
|
||||
`FL_ESPILOǸ̀`)
|
||||
- str:
|
||||
- `str`:
|
||||
ASCII character string - always evaluates to false
|
||||
- fn:
|
||||
- `fn`:
|
||||
Function, function "variables" are inherently of type fn - handle with care !
|
||||
- vec :
|
||||
Vectors of any type,
|
||||
- `vec`:
|
||||
Vectors of any type
|
||||
|
||||
## Core functions
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#define FL_EPSILON (1e-6f)
|
||||
|
||||
enum OpTypes {
|
||||
OP_add = 0,
|
||||
OP_sub = 1,
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "types.h"
|
||||
#include "byte_defs.h"
|
||||
|
||||
int main(){
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue