Skip to content

Releases: Samathingamajig/BarkScript

Version 0.1.7

25 Feb 08:39
85a7e79
Compare
Choose a tag to compare

Binary comparison operators and a unary bang operator.

Also changed how the Null type works.

#6

Version 0.1.6.1

24 Feb 20:16
Compare
Choose a tag to compare

Fixed a bug where Infinity plus a oppositely signed Number returned NaN (#3, #4)

Added command line arguments to the executable:

image

image
image

By the way, BarkScript.exe is Windows x64 (x86-64), BarkScript is Ubuntu Linux x64 (x86-64), and BarkScript_ARM is Linux ARM 32 (compiled on a Raspberry Pi 3)

Version 0.1.5

23 Feb 07:20
7b5b393
Compare
Choose a tag to compare

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

22 Feb 07:43
Compare
Choose a tag to compare

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 named variableName and gives it the value of expression when evaluated
  • let variableName This creates a variable named variableName and gives it the value of null when evaluated
  • variableName = expression This modifies the existing variable named variableName to have the value of expression when evalulated. If variableName is not a defined variable in the current scope, then it throws a RuntimeError
  • variableName cannot be a keyword a.k.a. reserved word or a Global Constant Variable

Version 0.1.2

21 Feb 07:36
Compare
Choose a tag to compare

Added two new types:

  • Boolean, which inherits from Number.
    • Can only be two values, 0.0 (false) or 1.0 (true)
    • When it's converted to a string, 0.0 -> false and 1.0 -> true
  • Null, which represents absolutely nothing at all. When casted to a Number, it is 0, and when casted to a Boolean, it is false.

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

20 Feb 10:48
Compare
Choose a tag to compare

Added basic variable functionality.

let bob = 5
5
bob / 4
1.25
let bob = 26
26
bob / 4
6.5

Version 0.0.7

15 Feb 06:24
Compare
Choose a tag to compare

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, or NaN
  • Division by 0 causes an error, except NaN / 0 doesn't cause an error
  • -0 == 0
  • More documentation will be made later...

Version 0.0.6

15 Feb 06:08
Compare
Choose a tag to compare

Changes:

  • Added Unary operators and parenthetical precedence

image
image

Version 0.0.5.1

15 Feb 05:55
Compare
Choose a tag to compare

Changes:

  • Code: Refactored to make Error's and Node's polymorphic
  • Code: Fixed entering nothing returning an error

Version 0.0.4

07 Feb 22:59
Compare
Choose a tag to compare

Better error handling instead of just crashing and saying "no error"
No changes to previous tokens/syntax.

image