Files
pebble/main.py

22 lines
453 B
Python

from src.lexer import Lexer
from src.token import Token
def main():
source: str = """() {} +- += / /= // sefs + {, )
}:: *
"This is a string"
3.1415
123
"This is
another string" """
path: str = "examples/06_comments.peb"
with open(path, "r") as f:
source = f.read()
lexer: Lexer = Lexer()
tokens: list[Token] = lexer.process(source, path)
print(tokens)
if __name__ == '__main__':
main()