fix: 语法问题

This commit is contained in:
me
2024-05-28 18:17:06 +08:00
parent 06cf13484d
commit c6f45b3368

View File

@@ -291,14 +291,16 @@ private FieldDeclaration ::= PropertyName ':' Type
CodeBlock ::= '{' Statement* '}'{
pin=1
}
private Statement ::= (ReturnStatement|IfElseStatement|ExpressionStatement) ';'?{
recoverWhile=recoverWhileForComponentBody
private Statement ::= (ReturnStatement|IfElseStatement|ExpressionStatement) ';'*{
}
ExpressionStatement ::= Expression (';'+ | &'}') {
pin=1
// recoverWhile=recoverWhileForComponentBody
}
ExpressionStatement ::= Expression (';' &Statement)?
//private recoverWhileStatement::=!(GenericIdentifier|';'|'}')
ReturnStatement ::= 'return' (Expression)?{
ReturnStatement ::= ReturnKeyword (Expression)?{
pin=1
}
private IfElseStatement ::= IfStatement (ElseIfStatement)* ElseStatement?{
@@ -504,7 +506,7 @@ AnimateKeyword::='animate'
OutKeyword::='out'
InOutKeyword::='in-out'
PrivateKeyword::='private'
ReturnKeyword::='return'
//---------NamedIdentifier ,简化PsiTree-----------------------------------
//noinspection BnfUnusedRule 用于标记命名节点对应的identifier
Named ::= PropertyName | TypeName |ExternalName | InternalName|ComponentName|FunctionName{