amanda.hinchman-dominguez
11/11/2019, 2:48 PMval getValOrVarKeyword: Scoped<PsiElement> = Scoped(value.getValOrVarKeyword)
raulraja
11/11/2019, 3:30 PMtoString
method how to render.amanda.hinchman-dominguez
11/11/2019, 3:32 PMraulraja
11/11/2019, 3:32 PM@annotationEntries
scope that when rendered produces an empty string. This is necessary so people can compose their templates safely without having to check for null
inside the templates which will be rather cumbersome since template expressions are hard to read when they spawn more than one line and nullable types chaining tends to nest whenever you want to do something complexamanda.hinchman-dominguez
11/11/2019, 3:32 PMraulraja
11/11/2019, 3:33 PMvalOrKeyword
with a template but if you do you would use there instead the actual concrete scope that gives you template powersamanda.hinchman-dominguez
11/11/2019, 3:34 PMKtParameter
, we probably want to know of the valOrVar
raulraja
11/11/2019, 3:34 PMval getValOrVarKeyword: ValOrKeywordScope = ValOrKeywordScope(value.getValOrVarKeyword)
ValOrKeywordScope : Scope<KtVarOrKeywordWhatever>
amanda.hinchman-dominguez
11/11/2019, 3:35 PMParameterScope
?raulraja
11/11/2019, 3:35 PMamanda.hinchman-dominguez
11/11/2019, 3:36 PMraulraja
11/11/2019, 3:36 PMScope<KtParameter>
we always want to use ParameterScope
which already extends Scope<KtParameter>
amanda.hinchman-dominguez
11/11/2019, 3:36 PMPsiElements
raulraja
11/11/2019, 3:41 PMthis
pointer is the actual scope so you can access the entire scope without a prefix.
2. The function receives an argument of the KtElement
type as it
giving you full access to the entire PSI api of that element including traversal, properties and everything you need,amanda.hinchman-dominguez
11/11/2019, 3:45 PMraulraja
11/11/2019, 3:47 PMbloder
11/11/2019, 3:49 PMval getValOrVarKeyword: ValOrVarKeywordScope = ValOrVarKeywordScope(value.getValOrVarKeyword)
raulraja
11/11/2019, 3:54 PMamanda.hinchman-dominguez
11/11/2019, 3:55 PMraulraja
11/11/2019, 3:55 PMKtElment -> Rendering
Rendering -> KtElement
"fun ...".function
FuncScope
instead of Scope<KtNamedFunction>
amanda.hinchman-dominguez
11/11/2019, 3:58 PMbloder
11/11/2019, 4:00 PMKtLoopExpression
/ KtForExpression
, I'll send you the implementation later @amanda.hinchman-dominguez to see if I'm missing or misunderstanding somethingamanda.hinchman-dominguez
11/11/2019, 4:01 PM