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
$code = '' # Line for execution | |
$line_no = 0 # Line number | |
$base = 0 # Master pointer | |
$vars = { } # Variables hash table | |
$lines = [ ] # Lines of program | |
$return_stack = [ ] # Call stack | |
$run = true # False if END |
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
$code = '' # Line for execution | |
$base = 0 # Master pointer, points the place where functions start parsing | |
def peek(oft) # Returns symbol from $code by index oft relatively to the $base | |
if oft < 0 or oft >= $code.size then return nil end | |
return $code[$base + oft] | |
end | |
def skip_trash # Function skipping whitespaces. | |
i = 0 # The pointer |