Replies: 2 comments 1 reply
-
You simply need to label these subrulesEnvoyé de mon iPhoneLe 26 juin 2023 à 05:00, hhtc ***@***.***> a écrit :
Below is a snippet of the grammar rules file I wrote(Definitions that do not appear, such as decimal and int, are grammar rules defined in the same file, Just didn't write the details here)
//worldborder
worldborder:'worldborder' worldborderOptions;
worldborderOptions:(add decimal int?)|(center pos2D)|(damage (amount|buffer) decimal);
amount:'amount';
buffer:'buffer';
damage:'damage';
center:'center';
So, now my question is how to get subrules in the listener through the current context or other parameters? Suppose I am writing code for EnterEveryRule, and the current context instance type is worldborderContext, how do I get the first member of all subrules of the worldborderOptions rule according to worldborderContext?(In this sample code what I need to get is add, center, damage)
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Not sure what you mean ? That’s just the way GitHub works.Envoyé de mon iPhoneLe 26 juin 2023 à 09:06, hhtc ***@***.***> a écrit :
So is the question sent to an email address?I can't see your email here
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Below is a snippet of the grammar rules file I wrote(Definitions that do not appear, such as decimal and int, are grammar rules defined in the same file, Just didn't write the details here)
So, now my question is how to get subrules in the listener through the current context or other parameters? Suppose I am writing code for EnterEveryRule, and the current context instance type is worldborderContext, how do I get the first member of all subrules of the worldborderOptions rule according to worldborderContext?(In this sample code what I need to get is add, center, damage)
Beta Was this translation helpful? Give feedback.
All reactions