From 74e065581ce154a69fed92b8dde29bc4f50512a8 Mon Sep 17 00:00:00 2001 From: codeboss <2422523675@qq.com> Date: Sun, 28 Jul 2024 14:46:47 +0800 Subject: [PATCH] update - syntax:msg --- libSyntax/libsyntax.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libSyntax/libsyntax.cpp b/libSyntax/libsyntax.cpp index 1c1f17f..afa20db 100644 --- a/libSyntax/libsyntax.cpp +++ b/libSyntax/libsyntax.cpp @@ -85,8 +85,10 @@ QString Rept::token_present() const { if(min_match == 0 && max_match == INT_MAX) return u8"(" + this->rule_peer->token_present() + QString(u8")*"); - else if(min_match == 1 && max_match == INT_MAX) + else if (min_match == 1 && max_match == INT_MAX) return u8"(" + this->rule_peer->token_present() + QString(u8")+"); + else if (min_match == 0 && max_match == 1) + return u8"(" + this->rule_peer->token_present() + QString(u8")?"); return u8"(" + this->rule_peer->token_present() + QString(u8"){%1, %2}").arg(min_match).arg(max_match); }