Lines of Code | 38 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | /** |
||
4 | class Token { |
||
5 | /** |
||
6 | * Create a Token. |
||
7 | * @param {String} type |
||
8 | * @param {*} value |
||
9 | */ |
||
10 | constructor(type, value) { |
||
11 | /** |
||
12 | * @private |
||
13 | * @type {String} |
||
14 | */ |
||
15 | this.type = type; |
||
16 | |||
17 | /** |
||
18 | * @private |
||
19 | * @type {*} |
||
20 | */ |
||
21 | this.value = value; |
||
22 | } |
||
23 | |||
24 | /** |
||
25 | * Return the token type |
||
26 | * @return {String} |
||
27 | */ |
||
28 | getType() { |
||
29 | return this.type; |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * Return the token value |
||
34 | * @return {*} |
||
35 | */ |
||
36 | getValue() { |
||
37 | return this.value; |
||
38 | } |
||
39 | } |
||
40 | |||
41 | export default Token; |
||
42 |