dineshumasankar / yartbml Goto Github PK
View Code? Open in Web Editor NEWYet Another Re-implementation of Thorsten Ball's Monkey Language
License: MIT License
Yet Another Re-implementation of Thorsten Ball's Monkey Language
License: MIT License
Assigned to @katherinerbanis
See #13
A "Null" Object is created within our language whenever we do out-of-bounds accesses on our own array(s) / hashmap(s), and this was a decision made by Thorsten Ball.
As far as I know, we can return an error whenever an "out-of-bounds" access or allow the program to execute under the context of null.
However, this does open up the rabbit hole of our language being able to set the state of variables as null, but not giving that power to the end-user being a programmer.
Evaluator Code Context
func evalArrayIndexExpression(array, index object.Object) object.Object {
arrayObject := array.(*object.Array)
idx := index.(*object.Integer).Value
max := int64(len(arrayObject.Elements) - 1)
if idx < 0 || idx > max {
return NULL <------
}
return arrayObject.Elements[idx]
}
func evalHashIndexExpression(hash, index object.Object) object.Object {
hashObject := hash.(*object.Hash)
key, ok := index.(object.Hashable)
if !ok {
return newError("unusable as hash key: %s", index.Type())
}
pair, ok := hashObject.Pairs[key.HashKey()]
if !ok {
return NULL <------
}
return pair.Value
}
This issue is meant to serve as a discussion.
Page 12-30 in TB's Book. Use the definitions provided from our teams chat for the tokens themselves. Discuss with me later regarding the tests for the lexer.
This will also create the initial implementation of the repl
Subtask of #13
Chapter 2.6 Subchapter Completion
Chapter 2.7
Chapter 2.8: Extending Parser
When invoking a function identifier, the function does not have proper braces when returning a nested function definition.
Hello <DesktopUserName>! This is the YARTBML programming language!
Feel free to type in commands
>> let addWrapper = fn() { return fn (x, y) { return x + y; }; };
>> addWrapper;
fn() {
return fn(x, y) return (x + y);;
}
Build the TextMate Grammar to properly highlight tokens within our language
Create a VSCode Extension to highlight tokens within VSCode
Research for other editors [NeoVim, Sublime]
Research Sprint: NeoVim Syntax highlighting [TreeSitter Integration]
Test Regex with Rubular in order to ensure regex is appropriate
TextMate Grammar
Setting up Extension Development on VSCODE
Managing Extension Manifest
Grammars Contribution Section Within Manifest
Syntax Highlighting Guide on VSCode
Example TextMate Grammar
Gleam Programming Language TextMate Grammar
Stretch Goal: Try it with shikijs for our browser-based interpreter version (later down the road)
Commits generated documentation PDF file(s) back into docs/dist
folder, when PR gets merged into main branch.
Closes #16
The goal of this REPL Chapter is to be a RPPL (Read Parse Print Loop), where each statement given to the REPL is immediately parsed and returned back in string form, in order to show us what our programming language currently parses and understands / stores when a statement is being parsed.
We'll follow along with book in order to evaluate the AST generated from the Parser to actually interpret our programming language.
Below are the list of chapters as we continue to implement alongside sub-chapters. Please convert each sub-chapter and checkbox into an issue and create PRs to keep track of them.
There are reading material only chapter(s) only here as well. READ THEM. You will have to talk about them in the presentation briefly.
Sub-task of #13
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.