From aa4de2df2c637e433e5e08697af971db77d317dc Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Wed, 17 Jun 2020 15:11:42 +0800 Subject: [PATCH] Fix flag:hard negative --- _server/MotaAction.g4 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/_server/MotaAction.g4 b/_server/MotaAction.g4 index 9a5f35ac..d30bcd67 100644 --- a/_server/MotaAction.g4 +++ b/_server/MotaAction.g4 @@ -376,14 +376,14 @@ return code; */; levelChooseChoice - : '难度分歧项' '名称' EvalString '简写' EvalString '变量:hard值' Int '颜色' ColorString? Colour BGNL Newline action+ BEND + : '难度分歧项' '名称' EvalString '简写' EvalString '变量:hard值' NInt '颜色' ColorString? Colour BGNL Newline action+ BEND /* levelChooseChoice tooltip : 难度分歧项 helpUrl : /_docs/#/instruction default : ['简单','Easy',1,''] ColorString_0 = ColorString_0 ? (', "color": [' + ColorString_0 + ']') : ''; -var code = '{"title": "'+EvalString_0+'", "name": "'+EvalString_1+'", "hard": '+Int_0+ColorString_0+', "action": [\n'+action_0+']},\n'; +var code = '{"title": "'+EvalString_0+'", "name": "'+EvalString_1+'", "hard": '+NInt_0+ColorString_0+', "action": [\n'+action_0+']},\n'; return code; */; @@ -3403,6 +3403,8 @@ Bool: 'TRUE' Int : '0' | [1-9][0-9]* ; // no leading zeros +NInt : '0' | '-'? [1-9][0-9]* ; + Letter_List : 'A'|'B'|'C'|'D'|'E'|'F'|'G'|'H'|'I'|'J'|'K'|'L'|'M'|'N'|'O'|'P'|'Q'|'R'|'S'|'T'|'U'|'V'|'W'|'X'|'Y'|'Z' /*Letter_List ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']*/;