Added lru_cache and range support for operations

This commit is contained in:
2023-02-22 15:47:07 +02:00
parent acbfacee59
commit 77cf10c95c
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,6 @@
""" Module for the parser """
from pathlib import Path
from functools import lru_cache
from lark import Lark
from .classes import Ziffers
from .mapper import ZiffersTransformer
@ -29,7 +30,7 @@ def parse_expression(expr: str) -> Ziffers:
"""
return ziffers_parser.parse(expr)
@lru_cache
def zparse(expr: str, **opts) -> Ziffers:
"""Parses ziffers expression with options