GreatSyntacticShift: Parser test data fixed
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
type Comparison<in T> = fun (T, T) : Int
|
||||
type Comparison<in T> = (T, T) -> Int
|
||||
|
||||
fun naturalOrder<in T : Comparable<T>>(a : T, b : T) : Int = a.compareTo(b)
|
||||
|
||||
@@ -8,9 +8,9 @@ enum class ComparisonResult {
|
||||
LS; EQ; GR
|
||||
}
|
||||
|
||||
type MatchableComparison<in T> = fun (T, T) : ComparisonResult
|
||||
type MatchableComparison<in T> = (T, T) -> ComparisonResult
|
||||
|
||||
fun asMatchableComparison<T>(cmp : Comparison<T>) : MatchableComparison<T> = {(a, b) =>
|
||||
fun asMatchableComparison<T>(cmp : Comparison<T>) : MatchableComparison<T> = {(a, b) ->
|
||||
val res = cmp(a, b)
|
||||
if (res == 0) return ComparisonResult.EQ
|
||||
if (res < 0) return ComparisonResult.LS
|
||||
|
||||
@@ -16,11 +16,9 @@ JetFile: Comparison.jet
|
||||
PsiElement(GT)('>')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_PARAMETER
|
||||
@@ -37,7 +35,7 @@ JetFile: Comparison.jet
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
@@ -255,11 +253,9 @@ JetFile: Comparison.jet
|
||||
PsiElement(GT)('>')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_PARAMETER
|
||||
@@ -276,7 +272,7 @@ JetFile: Comparison.jet
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
@@ -343,7 +339,7 @@ JetFile: Comparison.jet
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(DOUBLE_ARROW)('=>')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace('\n ')
|
||||
BLOCK
|
||||
PROPERTY
|
||||
|
||||
Reference in New Issue
Block a user