Parses an integer that represents a single coordinate.
(pos: LineCol, i: i32)
| 45 | |
| 46 | /// Parses an integer that represents a single coordinate. |
| 47 | fn parse_coordinate_value(pos: LineCol, i: i32) -> CallResult<i16> { |
| 48 | match i16::try_from(i) { |
| 49 | Ok(i) => Ok(i), |
| 50 | Err(_) => Err(CallError::Syntax(pos, format!("Coordinate {} out of range", i))), |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | /// Parses a pair of expressions that represent an (x,y) coordinate pair. |
| 55 | fn parse_coordinates(scope: &Scope<'_>, xarg: u8, yarg: u8) -> CallResult<PixelsXY> { |
no outgoing calls
no test coverage detected