Created
March 15, 2019 08:48
-
-
Save judah-caruso/bd72e55f7bfd173a4857ab3a4e4c9873 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int fib(n) | | |
if n <= 1 ? return x : return fib(n-1) + fib(n-2) | |
string concat(x, y) | return (string) x + y | |
vector loopTest(n) | | |
i = 0, ret_vec = [] | | |
for i != n : ret_vec[i] = i * 2, i++ >> return ret_vec | |
vector tokenStream = [] | |
vector cleanTokens(tokens) | | |
int diff, char temp_char, string temp | | |
vector_init(token_vector), for tkn in tokens : | |
checkWord(tkn), checkSpecial(tkn), checkSymbol(tkn), checkIdent(tkn) | |
boolean checkWord(token) | | |
if TOKENS[token] ? tokenStream.push(token) : return false | |
boolean checkSpecial(token) | | |
switch token : '\n' => true, '\t' => true, '\r' => true >> return false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment