From 4e7a814c0443b68864b20a0def093e7444218396 Mon Sep 17 00:00:00 2001 From: cat2151 Date: Wed, 6 Apr 2022 22:15:20 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC=E3=81=8C?= =?UTF-8?q?=E4=BB=BB=E6=84=8F=E3=81=AE=E7=A7=80=E4=B8=B8=E7=B5=84=E3=81=BF?= =?UTF-8?q?=E8=BE=BC=E3=81=BF=E9=96=A2=E6=95=B0=E3=82=92=EF=BC=88hidescrip?= =?UTF-8?q?t.ts=E3=81=AE=E5=86=8D=E3=83=88=E3=83=A9=E3=83=B3=E3=82=B9?= =?UTF-8?q?=E3=83=91=E3=82=A4=E3=83=AB=E3=82=92=E3=81=9B=E3=81=9A=E3=81=A8?= =?UTF-8?q?=E3=82=82=EF=BC=89=E4=BD=BF=E3=81=88=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=80=81=20hs=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E5=81=B4?= =?UTF-8?q?=E3=81=AB=E3=82=82=20registerBuiltinFunction()=20=E3=82=92?= =?UTF-8?q?=E8=A8=98=E8=BF=B0=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E3=81=97=E3=81=BE=E3=81=97=E3=81=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hidescript/hidescript.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/hidescript/hidescript.ts b/hidescript/hidescript.ts index da4d758..a03c3ef 100644 --- a/hidescript/hidescript.ts +++ b/hidescript/hidescript.ts @@ -762,7 +762,20 @@ function builtinFunction(pos: number, mode: number): string { function variableOrFunctionCall(mode: number): string { var pos = searchIdent(ident); if (pos < 0) { - syntaxError(ident + "が見つかりません"); + if (ident == "registerBuiltinFunction") { + nextSym(); + checkSym(symLParen, "("); + var arg1 = stringValue; + nextSym(); + checkSym(symComma, ','); + var arg2 = stringValue; + registerBuiltinFunction(arg1, arg2); + nextSym(); + checkSym(symRParen, ')'); + return "0vR// " + ident + " " + arg1 + " " + arg2; + } else { + syntaxError(ident + "が見つかりません"); + } } nextSym(); var type = wcsmidstr(identsType[pos], 0, 1);