Skip to content

Commit

Permalink
Improve error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
WingedSeal committed Nov 3, 2022
1 parent 9e0ae97 commit 053f12d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/jmc/command/builtin_function/execute_excluded.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def call(self) -> str:
commands.extend(self.datapack.parse_function_token(
Token(
TokenType.PAREN_CURLY,
self.raw_args["function"].token.line,
self.raw_args["function"].token.line + 1,
self.raw_args["function"].token.col,
_hardcode_process(
self.raw_args["function"].token.string, self.args["indexString"], i, self.token, self.tokenizer
Expand Down
2 changes: 1 addition & 1 deletion src/jmc/tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ def add_kwarg(token: Token) -> None:

if expecting_comma and token.token_type != TokenType.COMMA:
raise JMCSyntaxException(
f"Expected comma(,)", token, self, display_col_length=False)
f"Expected comma(,)", last_token, self)

if arrow_func_state > 0:
if arrow_func_state == 1:
Expand Down

0 comments on commit 053f12d

Please sign in to comment.