This file contains 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
<!DOCTYPE html> | |
<html> | |
<body> | |
<canvas id="myCanvas" width="500" height="500" style="border:1px solid #d3d3d3;"> | |
<script> | |
var c = document.getElementById("myCanvas"); | |
var ctx = c.getContext("2d"); |
This file contains 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
def lexer(str): | |
tokens=[] | |
is_string_mode=False | |
is_special_mode=False | |
string_ending_stack=[] #ok technically it's not a lexer | |
paren_count_stack=[0] | |
string_chars=['"',"'"] | |
for char in str: | |
if(not is_string_mode): |