Skip to content

Instantly share code, notes, and snippets.

@matklad

matklad/psi.kt Secret

Created February 23, 2020 00:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matklad/614ff5258115ca04577f9936a88a3319 to your computer and use it in GitHub Desktop.
Save matklad/614ff5258115ca04577f9936a88a3319 to your computer and use it in GitHub Desktop.
fun foo(
x: Int,
KtFile: Bar.kt(0,21)
PACKAGE_DIRECTIVE(0,0)
<empty list>
IMPORT_LIST(0,0)
<empty list>
FUN(0,21)
PsiElement(fun)('fun')(0,3)
PsiWhiteSpace(' ')(3,4)
PsiElement(IDENTIFIER)('foo')(4,7)
VALUE_PARAMETER_LIST(7,21)
PsiElement(LPAR)('(')(7,8)
PsiWhiteSpace('\n ')(8,13)
VALUE_PARAMETER(13,19)
PsiElement(IDENTIFIER)('x')(13,14)
PsiElement(COLON)(':')(14,15)
PsiWhiteSpace(' ')(15,16)
TYPE_REFERENCE(16,19)
USER_TYPE(16,19)
REFERENCE_EXPRESSION(16,19)
PsiElement(IDENTIFIER)('Int')(16,19)
PsiElement(COMMA)(',')(19,20)
PsiWhiteSpace('\n')(20,21)
VALUE_PARAMETER(21,21)
PsiErrorElement:Parameter name expected(21,21)
<empty list>
PsiErrorElement:Expecting comma or ')'(21,21)
<empty list>
PsiErrorElement:Expecting ')'(21,21)
<empty list>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment