bzr branch
http://gegoxaren.bato24.eu/bzr/vqdr/trunk
|
1
by Gustav Hartvigsson
* Initial code - far from done |
1 |
namespace VQDR.Expression { |
2 |
|
|
3 |
public abstract class ValueToken : Token { |
|
|
52.1.3
by Gustav Hartvigsson
int -> int32 |
4 |
protected ValueToken (int32 position) { |
|
1
by Gustav Hartvigsson
* Initial code - far from done |
5 |
base (position); |
6 |
} |
|
|
24
by Gustav Hartvigsson
* Fixed valadoc stuff. |
7 |
|
|
52.1.3
by Gustav Hartvigsson
int -> int32 |
8 |
public static ValueToken? init_constant_token (long val, int32 position) { |
|
24
by Gustav Hartvigsson
* Fixed valadoc stuff. |
9 |
return new ConstantValueToken (val, position); |
10 |
} |
|
11 |
|
|
|
57
by Gustav Hartvigsson
Made sure that no text rows exeed 80 columns. |
12 |
public static ValueToken? init_variable_token (string name, |
13 |
int32 position) { |
|
|
24
by Gustav Hartvigsson
* Fixed valadoc stuff. |
14 |
return new VariableValueToken (name, position); |
15 |
} |
|
16 |
|
|
|
52.1.3
by Gustav Hartvigsson
int -> int32 |
17 |
public static ValueToken? init_value_token (Value p1, int32 position) { |
|
24
by Gustav Hartvigsson
* Fixed valadoc stuff. |
18 |
switch (p1.type ()){ |
19 |
case (Type.STRING): |
|
20 |
return init_variable_token (p1.get_string (), position); |
|
21 |
case (Type.LONG): |
|
22 |
return new ConstantValueToken (p1.get_long (), position); |
|
23 |
} |
|
24 |
return null; |
|
25 |
} |
|
26 |
} |
|
|
23
by Gustav Hartvigsson
* Added DiceOperatiorToken |
27 |
|
|
1
by Gustav Hartvigsson
* Initial code - far from done |
28 |
}
|