diff options
| author | tanaka takashi <isazaka@gmail.com> | 2026-07-12 16:20:37 +0900 |
|---|---|---|
| committer | tanaka takashi <isazaka@gmail.com> | 2026-07-12 16:20:37 +0900 |
| commit | 8a1fcf81dbab9e2eff3c4d558c6910bc8208e49e (patch) | |
| tree | 70e6f5f867c8308f72fc106eb4ce0634c146d651 /src/mml_composemusic_mcp/parser_base.py | |
| parent | 22f96694a96ed9fba169e77bc27d19d00edca083 (diff) | |
MML構文解析処理一部修正。ドキュメント最新化
Diffstat (limited to 'src/mml_composemusic_mcp/parser_base.py')
| -rw-r--r-- | src/mml_composemusic_mcp/parser_base.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mml_composemusic_mcp/parser_base.py b/src/mml_composemusic_mcp/parser_base.py index 1cdb40f..506a33e 100644 --- a/src/mml_composemusic_mcp/parser_base.py +++ b/src/mml_composemusic_mcp/parser_base.py @@ -68,6 +68,19 @@ class ParserContext: context=context, ) + def add_missing_number_error( + self, token: Token, command: str, context: str = "" + ) -> None: + self.add_error( + code=ErrorCode.SYNTAX_INVALID_NUMBER, + line=token.line, + column=token.column, + message=f"'{command}' の後に数値が必要です。", + severity="error", + hint=f"例: {command}4 のように数値を続けてください。", + context=context, + ) + class ParserError(Exception): """Raised by parsers to abort a single statement and recover.""" |
