Skip to content

Commit 4f9db71

Browse files
committed
m
1 parent 8e416b5 commit 4f9db71

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/util/spreadsheet/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33

44
from .tokenizer import *
5+
from .parser import *
56
from .o_spreadsheet import *
67

78

src/util/spreadsheet/parser.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ def parse_expression(tokens, binding_power=0) -> AST:
8383

8484
def parse_function_args(tokens) -> Iterable[AST]:
8585
consume_or_raise(tokens, "LEFT_PAREN", error_msg="Missing opening parenthesis")
86+
if not tokens:
87+
raise ValueError("Unexpected end of formula")
8688
next_token = tokens[0]
8789
if next_token[0] == "RIGHT_PAREN":
8890
consume_or_raise(tokens, "RIGHT_PAREN")

0 commit comments

Comments
 (0)