[Compiler] Trap node not identified in module level #34008
gayalkuruppu
started this conversation in
General
Replies: 1 comment 3 replies
-
@gayalkuruppu Can you provide a code sample? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
[Updated]
In module level, the expression keywords such as
trap
,check
, andcheckpanic
are identified as theModulePartNode
. related: #33833Consider the following scenario:
Even though the code line with
trap
is not correct syntactically, we provide completions here and then give code actions to create a variable afterwards. Which makes the code line syntactically correct. This approach is used to improve the user experience and guide/ help the user to write code easily/correct even though started with an incorrect line.Screen.Recording.2021-11-26.at.09.58.38.mov
But in the module part, for expression related keywords we do not get completions due to this limitation of parser. So our UX end up like this in the module level.
It will be good if we can give the same UX in the module level as well. So can we fix this in order to identify these nodes as their respective matching nodes instead of
ModulePartNode
?@nadeeshaan @lochana-chathura @rdulmina
Beta Was this translation helpful? Give feedback.
All reactions