Decomposers
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
decomposer (a, a)
|
||||
decomposer ()
|
||||
decomposer foo<T>.{() : ()}.bar(a, a)
|
||||
decomposer a.foobar()
|
||||
[a] decomposer foobar([a] s)
|
||||
decomposer foobar()
|
||||
@@ -0,0 +1,103 @@
|
||||
JetFile: Decomposers.jet
|
||||
NAMESPACE
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foobar')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
DECOMPOSER
|
||||
MODIFIER_LIST
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foobar')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('s')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foobar')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -0,0 +1,10 @@
|
||||
decomposer (a a)
|
||||
decomposer foo<T>.{() : ()}.bar(, a)
|
||||
decomposer a.foobar)
|
||||
[a] decomposer foobar([a] s, )
|
||||
decomposer foobar([a])
|
||||
|
||||
|
||||
decomposer (a, a).
|
||||
decomposer ().
|
||||
decomposer foo<T>.{() : ()}.bar(a, a).
|
||||
@@ -0,0 +1,177 @@
|
||||
JetFile: Decomposers_ERR.jet
|
||||
NAMESPACE
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiErrorElement:Expecting a property name or a closing ')'
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiErrorElement:Expecting a property name
|
||||
<empty list>
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foobar')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiErrorElement:Expecting a property list in parentheses '( ... )'
|
||||
<empty list>
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
DECOMPOSER
|
||||
MODIFIER_LIST
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foobar')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('s')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiErrorElement:Expecting a property name
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foobar')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiErrorElement:Expecting a property name
|
||||
<empty list>
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n\n\n')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiErrorElement:Cannot define an extension decomposer on a tuple
|
||||
<empty list>
|
||||
PsiErrorElement:Expecting namespace or top level declaration
|
||||
PsiElement(DOT)('.')
|
||||
PsiWhiteSpace('\n')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiErrorElement:Cannot define an extension decomposer on a tuple
|
||||
<empty list>
|
||||
PsiErrorElement:Expecting namespace or top level declaration
|
||||
PsiElement(DOT)('.')
|
||||
PsiWhiteSpace('\n')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiErrorElement:Expecting namespace or top level declaration
|
||||
PsiElement(DOT)('.')
|
||||
Reference in New Issue
Block a user