Enum tfm::pl::ParseWarningKind
source · pub enum ParseWarningKind {
Show 24 variants
UnbalancedOpeningParenthesis {
opening_parenthesis_span: Range<usize>,
},
UnexpectedClosingParenthesis,
JunkInsidePropertyList {
junk: String,
},
JunkAfterPropertyValue {
junk: String,
},
ParameterNumberIsTooBig,
ParameterNumberIsZero,
SmallIntegerIsTooBig {
radix: u8,
},
IntegerIsTooBig {
radix: u8,
},
DecimalNumberIsTooBig,
InvalidPropertyName {
provided_name: String,
allowed_property_names: &'static [&'static str],
},
InvalidPrefixForInteger {
prefix: Option<char>,
},
InvalidPrefixForSmallInteger,
InvalidPrefixForDecimalNumber,
InvalidOctalDigit {
invalid_digit: char,
},
EmptyCharacterValue,
InvalidFaceCode,
InvalidBoolean,
HeaderIndexIsTooSmall,
LigTableIsTooBig,
CycleInLigKernProgram(InfiniteLoopError),
CycleInNextLargerProgram(NextLargerProgramWarning),
NotReallySevenBitSafe,
DesignSizeIsTooSmall,
NonVisibleAsciiCharacter {
character: char,
},
}
Expand description
Kind of parse warning.
Variants§
UnbalancedOpeningParenthesis
The file contains an opening parenthesis that is not followed/balanced by a closing parenthesis.
UnexpectedClosingParenthesis
The file contains a closing parenthesis that is not preceded/balanced by an opening parenthesis.
JunkInsidePropertyList
There is some junk in the middle of a property list;
e.g. (CHARWD D 9.0) junk (CHARDP D 8.0)
.
JunkAfterPropertyValue
There is some junk after a property value;
e.g. (CHECKSUM O 123 junk)
.
ParameterNumberIsTooBig
A parameter number has value 255 which is too big.
Due to how pltotf processes numbers, parameter numbers larger than 255 are reported with ParseWarningKind::SmallIntegerIsTooBig and ParseWarningKind::ParameterNumberIsZero warnings.
ParameterNumberIsZero
A parameter number has value 0 which is invalid as parameter numbers must be strictly positive.
SmallIntegerIsTooBig
A small integer is bigger than 255.
IntegerIsTooBig
An integer is bigger than 255^4.
DecimalNumberIsTooBig
A decimal number is bigger than 2048 in absolute value.
InvalidPropertyName
Fields
A property name is invalid.
InvalidPrefixForInteger
Invalid prefix for an integer.
InvalidPrefixForSmallInteger
Invalid prefix for a small integer.
InvalidPrefixForDecimalNumber
Invalid prefix for a decimal number.
InvalidOctalDigit
Invalid octal digit.
EmptyCharacterValue
No character value is provided.
InvalidFaceCode
Invalid face code
InvalidBoolean
Invalid boolean value.
HeaderIndexIsTooSmall
A header index is smaller than 18
LigTableIsTooBig
The lig table is too big (todo: larger than what?)
CycleInLigKernProgram(InfiniteLoopError)
The lig/kern program contains a cycle
CycleInNextLargerProgram(NextLargerProgramWarning)
The next larger program contains a cycle
NotReallySevenBitSafe
The file is really seven bit safe, even though it says it is
DesignSizeIsTooSmall
The design size is less than 1.
NonVisibleAsciiCharacter
The file contains a non-visible ASCII character.
Trait Implementations§
source§impl Clone for ParseWarningKind
impl Clone for ParseWarningKind
source§fn clone(&self) -> ParseWarningKind
fn clone(&self) -> ParseWarningKind
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ParseWarningKind
impl Debug for ParseWarningKind
source§impl PartialEq<ParseWarningKind> for ParseWarningKind
impl PartialEq<ParseWarningKind> for ParseWarningKind
source§fn eq(&self, other: &ParseWarningKind) -> bool
fn eq(&self, other: &ParseWarningKind) -> bool
self
and other
values to be equal, and is used
by ==
.