Notation
ReferencesEnumerates all supported notation patterns for parsing.
Enum values
| Name | Value | Description |
|---|---|---|
| None | 0 | No notation is indicated. |
| Null | 1 | Strings matching "null" or "∅" will yield null values. |
| Text | 2 | Text interpretation may both be proper text parsing based on surrounding quotes, or just the default result if no other type could be made to work. |
| Boolean | 4 | Various keywords will be interpreted as boolean values, including 'true', 'false', 'yes' and 'no'. |
| Integer | 8 | Any integer on the standard number line. Numbers are returned as either int or BigInteger instances. |
| Decimal | 16 | Any number on the standard number line. Scientific notation is supported, both the standard e-notation and the Grasshopper '×10²' notation. Constants are also included. Numbers are returned as double instances. |
| Angle | 32 | Angles are just numbers suffixed with either a degree-symbol, or an angle unit. Angles are returned as Angle instances. |
| Complex | 64 | Complex numbers consist of an imaginary value, with an optional real value. |
| TimeSpan | 128 | A TimeSpan instance. |
| DateTime | 256 | A DateTime instance. |
| Guid | 512 | Guids are interpreted using the standard framework Guid.TryParse(string, Guid) method. |
| Point | 1024 | Points are two or three numerics, separated by commas, surrounded by parentheses. Points are return as Point2d or Point3d instances. |
| Vector | 2048 | Vectors are two or three numerics, separated by commas, surrounded by parentheses. Vectors are returned as Vector3d instances. |
| Plane | 4096 | At present only standard world planes are supported, using strings like 'xy', 'yz', or 'WorldZX'. Planes are return as Plane instances. |
| Interval | 8192 | Intervals are two numerics, separated by a " to " operator. Surrounding parentheses are allowed, as is a comma separator. |
| Colour | 16384 | Colours, if matched, may yield both Color and Colour instances. |
| Gradient | 32768 | Colour gradients parsed using Gradient.TryParse(string). |
| Function | 65536 | A Function instance. Note that parsing functions is very slow. |
| Native | 131071 | All native single values excepting lists, ranges and constructors. |
| List | 1048576 | Lists are comma separated values surrounded by square brackets. Lists may contain all other types of data, except nested lists. Lists are returned as ITwig instances. |
| Range | 2097152 | Ranges are double-dot separated numbers in range notation. This yields a Tree<T> of type int, BigInteger, or double. |
| Sets | 3145728 | Lists and ranges, the two notations which stand for several values at once. |
| Constructor | 1073741824 | Constructor notation syntax requires a registered type keyword, followed by arguments inside parentheses, for example vec(2pi, 5, 6). |
| SingleValue | 1073872895 | All native values plus constructors. |
| All | 1077018623 | All notations, including all native values, constructors, tuples, lists and ranges. |