Releases: Samathingamajig/BarkScript
Version 0.1.7
Version 0.1.6.1
Version 0.1.5
No feature updates/syntax changes, but there is significant memory and file size reduction. I didn't know that C++ has implicit copying in functions and variables instead of sending references (like other languages do when it's a non-primitive value), so I changed a lot of general code, constructors, and my special copy functions.
Also there is an even bigger file size reduction in the Windows (.exe
) version because I decided to turn on compiler optimizations at level O2
Version 0.1.4
There is now a difference between saying "Hey, this variable exists now (with optional starting value)" and "Hey, modify this variable which already exists"
let variableName = expression
This creates a variable namedvariableName
and gives it the value ofexpression
when evaluatedlet variableName
This creates a variable namedvariableName
and gives it the value ofnull
when evaluatedvariableName = expression
This modifies the existing variable namedvariableName
to have the value ofexpression
when evalulated. IfvariableName
is not a defined variable in the current scope, then it throws aRuntimeError
variableName
cannot be a keyword a.k.a. reserved word or a Global Constant Variable
Version 0.1.2
Added two new types:
Boolean
, which inherits fromNumber
.- Can only be two values,
0.0
(false
) or1.0
(true
) - When it's converted to a string,
0.0
->false
and1.0
->true
- Can only be two values,
Null
, which represents absolutely nothing at all. When casted to aNumber
, it is0
, and when casted to aBoolean
, it isfalse
.
Also added a globalConstantVariablesTable
which is a std::unordered_map<std::string, spObject>
(basically a dictionary) which stores values like true
, false
, null
, Infinity
, and NaN
, which replaces identifiers which have those strings as it's value with the proper value.
std::unordered_map<std::string, spObject> globalConstantVariablesTable = {
{ "null", makeSharedObject(Null()) },
{ "Infinity", makeSharedObject(Number("Infinity")) },
{ "NaN", makeSharedObject(Number("NaN")) },
{ "true", makeSharedObject(Boolean(true)) },
{ "false", makeSharedObject(Boolean(false)) },
};
Version 0.1.0
Added basic variable functionality.
let bob = 5
5
bob / 4
1.25
let bob = 26
26
bob / 4
6.5
Version 0.0.7
Changes:
- Added interpreter functionality
- Added ability to compile to a Linux binary with
g++
Extra stuff:
- Polymorphic objects, makes it easier to develop more types of objects
Specifics:
- Currently only a
Number
object - A
Number
's value is either a ±double (IEEE 754),±Infinity
, orNaN
- Division by
0
causes an error, exceptNaN / 0
doesn't cause an error -0 == 0
- More documentation will be made later...
Version 0.0.6
Version 0.0.5.1
Changes:
- Code: Refactored to make Error's and Node's polymorphic
- Code: Fixed entering nothing returning an error