parse imports in scripts

This commit is contained in:
Stepan Koltsov
2012-06-13 22:32:36 +04:00
parent 669d7c704c
commit 4d06660243
3 changed files with 52 additions and 4 deletions
@@ -0,0 +1,4 @@
import aaa.bbb.Ccc
import ddd.*
fun foo() = 1
+37
View File
@@ -0,0 +1,37 @@
JetFile: Import.ktscript
SCRIPT
IMPORT_DIRECTIVE
PsiElement(import)('import')
PsiWhiteSpace(' ')
DOT_QUALIFIED_EXPRESSION
DOT_QUALIFIED_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('aaa')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('bbb')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Ccc')
PsiWhiteSpace('\n')
IMPORT_DIRECTIVE
PsiElement(import)('import')
PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('ddd')
PsiElement(DOT)('.')
PsiElement(MUL)('*')
PsiWhiteSpace('\n\n')
BLOCK
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('foo')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('1')