Skip to content

Commit

Permalink
added more unittest data refs #38
Browse files Browse the repository at this point in the history
  • Loading branch information
drieks committed May 11, 2021
1 parent 799272d commit 6e557bc
Show file tree
Hide file tree
Showing 5 changed files with 285 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
class A {
companion object
}

class B {
companion object Name
}

class C {
companion object {
val name: String
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
kotlinFile
packageHeader
importList
topLevelObject
declaration
classDeclaration
CLASS >>>class<<< (DEFAULT_TOKEN_CHANNEL)
WS >>> <<< (HIDDEN)
simpleIdentifier
Identifier >>>A<<< (DEFAULT_TOKEN_CHANNEL)
WS >>> <<< (HIDDEN)
classBody
LCURL >>>{<<< (DEFAULT_TOKEN_CHANNEL)
NL >>>\n<<< (DEFAULT_TOKEN_CHANNEL)
WS >>> <<< (HIDDEN)
WS >>> <<< (HIDDEN)
WS >>> <<< (HIDDEN)
WS >>> <<< (HIDDEN)
classMemberDeclarations
classMemberDeclaration
companionObject
COMPANION >>>companion<<< (DEFAULT_TOKEN_CHANNEL)
WS >>> <<< (HIDDEN)
OBJECT >>>object<<< (DEFAULT_TOKEN_CHANNEL)
semis
NL >>>\n<<< (DEFAULT_TOKEN_CHANNEL)
RCURL >>>}<<< (DEFAULT_TOKEN_CHANNEL)
semis
NL >>>\n<<< (DEFAULT_TOKEN_CHANNEL)
NL >>>\n<<< (DEFAULT_TOKEN_CHANNEL)
topLevelObject
declaration
classDeclaration
CLASS >>>class<<< (DEFAULT_TOKEN_CHANNEL)
WS >>> <<< (HIDDEN)
simpleIdentifier
Identifier >>>B<<< (DEFAULT_TOKEN_CHANNEL)
WS >>> <<< (HIDDEN)
classBody
LCURL >>>{<<< (DEFAULT_TOKEN_CHANNEL)
NL >>>\n<<< (DEFAULT_TOKEN_CHANNEL)
WS >>> <<< (HIDDEN)
WS >>> <<< (HIDDEN)
WS >>> <<< (HIDDEN)
WS >>> <<< (HIDDEN)
classMemberDeclarations
classMemberDeclaration
companionObject
COMPANION >>>companion<<< (DEFAULT_TOKEN_CHANNEL)
WS >>> <<< (HIDDEN)
OBJECT >>>object<<< (DEFAULT_TOKEN_CHANNEL)
WS >>> <<< (HIDDEN)
simpleIdentifier
Identifier >>>Name<<< (DEFAULT_TOKEN_CHANNEL)
semis
NL >>>\n<<< (DEFAULT_TOKEN_CHANNEL)
RCURL >>>}<<< (DEFAULT_TOKEN_CHANNEL)
semis
NL >>>\n<<< (DEFAULT_TOKEN_CHANNEL)
NL >>>\n<<< (DEFAULT_TOKEN_CHANNEL)
topLevelObject
declaration
classDeclaration
CLASS >>>class<<< (DEFAULT_TOKEN_CHANNEL)
WS >>> <<< (HIDDEN)
simpleIdentifier
Identifier >>>C<<< (DEFAULT_TOKEN_CHANNEL)
WS >>> <<< (HIDDEN)
classBody
LCURL >>>{<<< (DEFAULT_TOKEN_CHANNEL)
NL >>>\n<<< (DEFAULT_TOKEN_CHANNEL)
WS >>> <<< (HIDDEN)
WS >>> <<< (HIDDEN)
WS >>> <<< (HIDDEN)
WS >>> <<< (HIDDEN)
classMemberDeclarations
classMemberDeclaration
companionObject
COMPANION >>>companion<<< (DEFAULT_TOKEN_CHANNEL)
WS >>> <<< (HIDDEN)
OBJECT >>>object<<< (DEFAULT_TOKEN_CHANNEL)
WS >>> <<< (HIDDEN)
classBody
LCURL >>>{<<< (DEFAULT_TOKEN_CHANNEL)
NL >>>\n<<< (DEFAULT_TOKEN_CHANNEL)
WS >>> <<< (HIDDEN)
WS >>> <<< (HIDDEN)
WS >>> <<< (HIDDEN)
WS >>> <<< (HIDDEN)
WS >>> <<< (HIDDEN)
WS >>> <<< (HIDDEN)
WS >>> <<< (HIDDEN)
WS >>> <<< (HIDDEN)
classMemberDeclarations
classMemberDeclaration
declaration
propertyDeclaration
VAL >>>val<<< (DEFAULT_TOKEN_CHANNEL)
WS >>> <<< (HIDDEN)
variableDeclaration
simpleIdentifier
Identifier >>>name<<< (DEFAULT_TOKEN_CHANNEL)
COLON >>>:<<< (DEFAULT_TOKEN_CHANNEL)
WS >>> <<< (HIDDEN)
type
typeReference
userType
simpleUserType
simpleIdentifier
Identifier >>>String<<< (DEFAULT_TOKEN_CHANNEL)
NL >>>\n<<< (DEFAULT_TOKEN_CHANNEL)
WS >>> <<< (HIDDEN)
WS >>> <<< (HIDDEN)
WS >>> <<< (HIDDEN)
WS >>> <<< (HIDDEN)
RCURL >>>}<<< (DEFAULT_TOKEN_CHANNEL)
semis
NL >>>\n<<< (DEFAULT_TOKEN_CHANNEL)
RCURL >>>}<<< (DEFAULT_TOKEN_CHANNEL)
semis
NL >>>\n<<< (DEFAULT_TOKEN_CHANNEL)
EOF >>><EOF><<< (DEFAULT_TOKEN_CHANNEL)
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
ID Index Position Token
[0..139] [1:1..14:6] kotlinFile
packageHeader
importList
[0..34] [1:1..4:2] topLevelObject
[0..32] [1:1..3:2] declaration
[0..32] [1:1..3:2] classDeclaration
0 [0..5] [1:1..1:6] CLASS
1 [5..6] [1:6..1:7] WS
[6..7] [1:7..1:8] simpleIdentifier
2 [6..7] [1:7..1:8] Identifier
3 [7..8] [1:8..1:9] WS
[8..32] [1:9..3:2] classBody
4 [8..9] [1:9..1:10] LCURL
5 [9..10] [1:10..1:11] NL
6 [10..11] [2:1..2:2] WS
7 [11..12] [2:2..2:3] WS
8 [12..13] [2:3..2:4] WS
9 [13..14] [2:4..2:5] WS
[14..31] [2:5..2:22] classMemberDeclarations
[14..30] [2:5..2:21] classMemberDeclaration
[14..30] [2:5..2:21] companionObject
10 [14..23] [2:5..2:14] COMPANION
11 [23..24] [2:14..2:15] WS
12 [24..30] [2:15..2:21] OBJECT
[30..31] [2:21..2:22] semis
13 [30..31] [2:21..2:22] NL
14 [31..32] [3:1..3:2] RCURL
[32..34] [3:2..4:2] semis
15 [32..33] [3:2..3:3] NL
16 [33..34] [4:1..4:2] NL
[34..73] [5:1..8:2] topLevelObject
[34..71] [5:1..7:2] declaration
[34..71] [5:1..7:2] classDeclaration
17 [34..39] [5:1..5:6] CLASS
18 [39..40] [5:6..5:7] WS
[40..41] [5:7..5:8] simpleIdentifier
19 [40..41] [5:7..5:8] Identifier
20 [41..42] [5:8..5:9] WS
[42..71] [5:9..7:2] classBody
21 [42..43] [5:9..5:10] LCURL
22 [43..44] [5:10..5:11] NL
23 [44..45] [6:1..6:2] WS
24 [45..46] [6:2..6:3] WS
25 [46..47] [6:3..6:4] WS
26 [47..48] [6:4..6:5] WS
[48..70] [6:5..6:27] classMemberDeclarations
[48..69] [6:5..6:26] classMemberDeclaration
[48..69] [6:5..6:26] companionObject
27 [48..57] [6:5..6:14] COMPANION
28 [57..58] [6:14..6:15] WS
29 [58..64] [6:15..6:21] OBJECT
30 [64..65] [6:21..6:22] WS
[65..69] [6:22..6:26] simpleIdentifier
31 [65..69] [6:22..6:26] Identifier
[69..70] [6:26..6:27] semis
32 [69..70] [6:26..6:27] NL
33 [70..71] [7:1..7:2] RCURL
[71..73] [7:2..8:2] semis
34 [71..72] [7:2..7:3] NL
35 [72..73] [8:1..8:2] NL
[73..139] [9:1..13:3] topLevelObject
[73..138] [9:1..13:2] declaration
[73..138] [9:1..13:2] classDeclaration
36 [73..78] [9:1..9:6] CLASS
37 [78..79] [9:6..9:7] WS
[79..80] [9:7..9:8] simpleIdentifier
38 [79..80] [9:7..9:8] Identifier
39 [80..81] [9:8..9:9] WS
[81..138] [9:9..13:2] classBody
40 [81..82] [9:9..9:10] LCURL
41 [82..83] [9:10..9:11] NL
42 [83..84] [10:1..10:2] WS
43 [84..85] [10:2..10:3] WS
44 [85..86] [10:3..10:4] WS
45 [86..87] [10:4..10:5] WS
[87..137] [10:5..12:7] classMemberDeclarations
[87..136] [10:5..12:6] classMemberDeclaration
[87..136] [10:5..12:6] companionObject
46 [87..96] [10:5..10:14] COMPANION
47 [96..97] [10:14..10:15] WS
48 [97..103] [10:15..10:21] OBJECT
49 [103..104] [10:21..10:22] WS
[104..136] [10:22..12:6] classBody
50 [104..105] [10:22..10:23] LCURL
51 [105..106] [10:23..10:24] NL
52 [106..107] [11:1..11:2] WS
53 [107..108] [11:2..11:3] WS
54 [108..109] [11:3..11:4] WS
55 [109..110] [11:4..11:5] WS
56 [110..111] [11:5..11:6] WS
57 [111..112] [11:6..11:7] WS
58 [112..113] [11:7..11:8] WS
59 [113..114] [11:8..11:9] WS
[114..131] [11:9..11:26] classMemberDeclarations
[114..131] [11:9..11:26] classMemberDeclaration
[114..131] [11:9..11:26] declaration
[114..131] [11:9..11:26] propertyDeclaration
60 [114..117] [11:9..11:12] VAL
61 [117..118] [11:12..11:13] WS
[118..130] [11:13..11:25] variableDeclaration
[118..122] [11:13..11:17] simpleIdentifier
62 [118..122] [11:13..11:17] Identifier
63 [122..123] [11:17..11:18] COLON
64 [123..124] [11:18..11:19] WS
[124..130] [11:19..11:25] type
[124..130] [11:19..11:25] typeReference
[124..130] [11:19..11:25] userType
[124..130] [11:19..11:25] simpleUserType
[124..130] [11:19..11:25] simpleIdentifier
65 [124..130] [11:19..11:25] Identifier
66 [130..131] [11:25..11:26] NL
67 [131..132] [12:1..12:2] WS
68 [132..133] [12:2..12:3] WS
69 [133..134] [12:3..12:4] WS
70 [134..135] [12:4..12:5] WS
71 [135..136] [12:5..12:6] RCURL
[136..137] [12:6..12:7] semis
72 [136..137] [12:6..12:7] NL
73 [137..138] [13:1..13:2] RCURL
[138..139] [13:2..13:3] semis
74 [138..139] [13:2..13:3] NL
75 [139..139] [14:1..14:6] EOF
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
PackageHeader()
importList
KlassDeclaration(class A)
classBody
KlassDeclaration(companion object)
KlassDeclaration(class B)
classBody
KlassDeclaration(companion object Name)
KlassDeclaration(class C)
classBody
KlassDeclaration(companion object)
classBody
KlassDeclaration(val name String)
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
ID Index Position Token
PackageHeader()
importList
[0..32] [1:1..3:2] KlassDeclaration(class A)
[8..32] [1:9..3:2] classBody
[14..30] [2:5..2:21] KlassDeclaration(companion object)
[34..71] [5:1..7:2] KlassDeclaration(class B)
[42..71] [5:9..7:2] classBody
[48..69] [6:5..6:26] KlassDeclaration(companion object Name)
[73..138] [9:1..13:2] KlassDeclaration(class C)
[81..138] [9:9..13:2] classBody
[87..136] [10:5..12:6] KlassDeclaration(companion object)
[104..136] [10:22..12:6] classBody
[114..131] [11:9..11:26] KlassDeclaration(val name String)

0 comments on commit 6e557bc

Please sign in to comment.