|
Revision 10652, 0.7 kB
(checked in by gyuque, 5 years ago)
|
|
converter version(OK, works at least as hand-wrote version)
|
| Line | |
|---|
| 1 | package css
|
|---|
| 2 | {
|
|---|
| 3 | public class Value
|
|---|
| 4 | {
|
|---|
| 5 | public static const Operator:uint = 0x100000;
|
|---|
| 6 | public static const Function:uint = 0x100001;
|
|---|
| 7 | public static const Q_EMS:uint = 0x100002;
|
|---|
| 8 |
|
|---|
| 9 | public static const OP_SLASH:uint = 0x2f;
|
|---|
| 10 | public static const OP_COMMA:uint = 0x2c;
|
|---|
| 11 |
|
|---|
| 12 | public var id:int;
|
|---|
| 13 | public var unit:int;
|
|---|
| 14 |
|
|---|
| 15 | public var isInt:Boolean;
|
|---|
| 16 |
|
|---|
| 17 | // union
|
|---|
| 18 | public var stringVal:String;
|
|---|
| 19 | public var fValue:Number;
|
|---|
| 20 | public var iValue:int;
|
|---|
| 21 |
|
|---|
| 22 | public function set string(s:String):void
|
|---|
| 23 | {
|
|---|
| 24 | stringVal = s;
|
|---|
| 25 | }
|
|---|
| 26 |
|
|---|
| 27 | public function dump():String
|
|---|
| 28 | {
|
|---|
| 29 | var ret:String = "Value: ";
|
|---|
| 30 |
|
|---|
| 31 | if (unit == CSSPrimitiveValue.CSS_RGBCOLOR)
|
|---|
| 32 | ret += "RGBCOLOR, "+stringVal;
|
|---|
| 33 | else
|
|---|
| 34 | ret += "unknown";
|
|---|
| 35 |
|
|---|
| 36 | return ret;
|
|---|
| 37 | }
|
|---|
| 38 | }
|
|---|
| 39 | } |
|---|