need examples to understand postfix expression grammar
FabArd
hoarau.fabrice at free.fr
Thu Apr 20 19:53:05 UTC 2023
I am trying to put the D grammar rules into tree-sitter in order
to understand how it works and to deepen my knowledge of the D
language.
So how to determine the following expressions:
1 Window window = Platform.instance.createWindow("Bezier
curves", 300, 500);
2 window.show();
3 return Platform.instance.enterMessageLoop();
4 Point sz = font.textSize(text);
My problem is that all these expressions are interpreted with
"type conversion" expression rule and not function call
expression rule.
How to distinguish a function call expression from a "type
conversion" expression?
Knowing that the two rules can be applied to all these
expressions.
To solve part of my problem a solution would be to be able to
restrict a rule to its strict minimum. This is why I made the
previous proposal.
Is it correct to restrict this rule as I propose?
If possible, line 1 of the above examples becomes a function call
expression.
If not can you give me examples of type conversion expression
with a list of arguments.
Would there be a safe way to determine a function call expression
from a type conversion expression?
Thanks
More information about the Digitalmars-d
mailing list