hello
i like programming. i pinned some of the projects that i think best represent me and my programming ability. have fun!
extension of torquescript
hello
i like programming. i pinned some of the projects that i think best represent me and my programming ability. have fun!
Add the ability to recursively iterate a directory for .egg
files. A flag is also an option.
error checking can be accomplished by figuring out if a particular expression is supposed to be in a specific location or not. for instance, operators or literals cannot not have a parent that is a code block. an if statement or a function declaration cannot have a parent that is a variable assignment. doing those sorts of checks should reduce the amount of errors that we pass to .cs files.
additionally, some error messages are vague and unhelpful. if you do something like:
for(%i = 0; %i < 50; %i++)
%hey += %i;
}
then you may get an EOF error, which doesn't make too much sense. additionally, it'll give you an incorrect line number and character number for the source of the error too, further confusing things.
i was thinking of being lazy and having torquescript do all of the hard work, but the program really should be able to detect things on its own. error checking is so lacking right now that
%variable = someMethod();
else {
echo("hey");
}
is treated as entirely correct.
when setting the operator ban before backtracking, its sometimes set incorrectly and we skip over characters that we should be parsing. for instance, if quotes are treated as an operator, then the parser will read strReplace(%string, ",", "")
and output it as strReplace(%string, "," "")
. this misses the comma outside of the string, because that comma is included in the operator ban. this example is an extremely special case, since "
and ,
are operators. the operator search continues way past the string out of necessity. it stops when it encounters the space. the parser doesn't know any better and assumes that the string ",",
could hold a potentially valid operator eventually, so we must keep going. this backtracking is very performant and otherwise entirely safe to use, so i'm not going to reengineer how it entirely works just for this case.
i think the error is happening because the operator ban factors in spaces, while the rest of the parser doesn't. we should probably subtract the amount of spaces we encounter in an operator search from the index the operator ban ends at.
The tokenizer function is very busy and sort of poorly designed. There are two main ways we detect tokens: through keywords and through operator give backs. It is likely that I could combine both of these methods of detection into one. Additionally, we could probably remove the big if-else chain going on that picks up the remaining scraps of the syntax. Hopefully, the tokenizer function shouldn't grow too out of control now that vector expressions are added -- I do not have any plans that require additional modification in the future.
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.