Wake up the snake

master
Yury Kurlykov 2020-04-15 16:45:22 +10:00
parent 8b88405fc5
commit e10f7cca41
Signed by: t1meshift
GPG Key ID: B133F3167ABF94D8
3 changed files with 18 additions and 6 deletions

View File

@ -30,3 +30,6 @@ python -m jasminesnake
JavaScript grammar source:
[https://github.com/antlr/grammars-v4/tree/master/javascript/javascript](https://github.com/antlr/grammars-v4/tree/master/javascript/javascript)
The snake:
[https://textart.io/art/lnl9xe1OsKIow7xPGeWDrAeF/snake](https://textart.io/art/lnl9xe1OsKIow7xPGeWDrAeF/snake)

View File

@ -1,3 +1,15 @@
__version__ = "0.0.1"
__snake__ = """
_________ _________
/ \ / \\
/ /~~~~~\ \ / /~~~~~\ \\
| | | | | | | |
| | | | | | | |
| | | | | | | | /
| | | | | | | | //
(o o) \ \_____/ / \ \_____/ /
\__/ \ / \ /
| ~~~~~~~~~ ~~~~~~~~
^
"""
# TODO: make it usable as a module too

View File

@ -1,4 +1,4 @@
from jasminesnake import __version__
from jasminesnake import __version__, __snake__
from antlr4 import *
from .lex import JavaScriptLexer, JavaScriptParser
@ -30,10 +30,7 @@ def main():
print("Jasmine Snake v{version}".format(version=__version__))
if args.snake:
print(
colorama.Style.DIM
+ "[snake is sleeping now, so you see this stub. pretend you see the snake, please.]"
)
print(colorama.Style.DIM + __snake__ + colorama.Style.RESET_ALL)
print(
colorama.Fore.BLACK
+ colorama.Back.YELLOW