Skip to content

Latest commit

 

History

History
37 lines (32 loc) · 4.66 KB

FEATURES.md

File metadata and controls

37 lines (32 loc) · 4.66 KB

Syntax

These features require modification to the compiler, involving changes to the lexer, parser and code generator. These typically have to do with how the language looks.

Feature Remaining Systems Example
For Loops codegen
for x in iter() do  print(x)end
While Loops codegen
while i < 5 do  print(array[i])end
Function Definition Accessor parser & codegen
function Namespace.helloWorld()  print("Hello, world!")end
Method Definition parser & codegen
function Class:setCounter(x)  self.counter = xend
No Parenthesis Function Call ✔️
print "Hello"print {1, 2, 3}
Method Call parser & codegen
local class = Class()class:setCounter(4)
Order Of Operations ✔️
-- Prints 7 like a well behaved interpreter should.print(1 + 2 * 3)
Binary Operators codegen
print(1 == 1 and 2 ~= 3)
Unary Operators parser & codegen
print(not ~8)

Virtual Machine

These features require modification to the virtual machine and it's opcodes, and occasionally the code generator. These typically have to do with how the language acts.

Feature Remaining Systems Technical Notes
Global Scope ✔️ Currently, globals can be accessed but they cannot be assigned to or modified.
Userdata virtual machine Userdata, AKA native types currently do not exist in any capacity.
Native Functions ✔️ While native functions are complete, arguments to them may need to be reworked, see upvalue's technical notes.
Upvalues ✔️ In order to properly implement upvalues, a rework of local variables needs to be completed.
Metatables ✔️ Metatables do exist, but not all operations use the metamethods on a table's metatable.

Project Structure

These features are rather monolithic in scale, but thankfully there's no desperate need to have these implemented any time soon. For now, the plan is these features will be implemented in mid to late beta of the project.

Feature Remaining Systems Technical Notes
Garbage Collector virtual machine Currently, the project uses Rust's Arc type for memory reclamation. In other words, reference counting, which is known to be slow.
String Interner all systems All strings created and used are either fully owned, or leaked (to avoid having to change types). This feature will be due before the garbage collector because of it's easy nature, and that it will fix some of the Box::leaks.
Source File Information all systems This involves adding source file information, such as line number and source file name to all data structures. This feature is the least prioritized right now.